r16461 by fschmid - Fixed Bug #9855: Crash when importing EPS file.
scribus-commit
scribus-commit at lists.scribus.net
Sat Mar 19 21:41:50 CET 2011
Author: fschmid
Date: Sat Mar 19 20:41:50 2011
New Revision: 16461
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16461
Log:
Fixed Bug #9855: Crash when importing EPS file.
Modified:
trunk/Scribus/scribus/fpointarray.cpp
trunk/Scribus/scribus/util.cpp
Modified: trunk/Scribus/scribus/fpointarray.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16461&path=/trunk/Scribus/scribus/fpointarray.cpp
==============================================================================
--- trunk/Scribus/scribus/fpointarray.cpp (original)
+++ trunk/Scribus/scribus/fpointarray.cpp Sat Mar 19 20:41:50 2011
@@ -43,6 +43,7 @@
tmp << *this;
tmp.count = count;
tmp.capacity = capacity;
+ tmp.QVector<FPoint>::squeeze();
return tmp;
}
@@ -64,6 +65,22 @@
*/
bool FPointArray::resize(uint newCount)
{
+ if (newCount == 0)
+ {
+ QVector<FPoint>::resize(0);
+ QVector<FPoint>::squeeze();
+ capacity = newCount;
+ count = newCount;
+ return true;
+ }
+ else
+ {
+ QVector<FPoint>::resize(newCount);
+ capacity = newCount;
+ count = newCount;
+ return true;
+ }
+/*
if (newCount <= capacity) {
count = newCount;
return true;
@@ -86,7 +103,7 @@
return true;
}
}
- sDebug(QString("Failed resize(): count=%1 capacity=%2 newCount=%3").arg(count).arg(capacity).arg(newCount));
+ sDebug(QString("Failed resize(): count=%1 capacity=%2 newCount=%3").arg(count).arg(capacity).arg(newCount)); */
return false;
}
Modified: trunk/Scribus/scribus/util.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16461&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp (original)
+++ trunk/Scribus/scribus/util.cpp Sat Mar 19 20:41:50 2011
@@ -58,9 +58,9 @@
if (!fileStdErr.isEmpty())
proc.setStandardErrorFile(fileStdErr);
proc.start(exename, args);
- if (proc.waitForStarted(5000))
- {
- while (!proc.waitForFinished(5000))
+ if (proc.waitForStarted(15000))
+ {
+ while (!proc.waitForFinished(15000))
{
qApp->processEvents();
if (cancel && (*cancel == true))
More information about the scribus-commit
mailing list