[PC-BSD Commits] r4062 - pcbsd/trunk/kcmPBSystem
svn at pcbsd.org
svn at pcbsd.org
Mon Jun 8 13:34:41 PDT 2009
Author: kris
Date: 2009-06-08 13:34:41 -0700 (Mon, 08 Jun 2009)
New Revision: 4062
Modified:
pcbsd/trunk/kcmPBSystem/portsnapprogress.cpp
Log:
Fixed a bug with portsnap crashing in the PC-BSD System Tool
Modified: pcbsd/trunk/kcmPBSystem/portsnapprogress.cpp
===================================================================
--- pcbsd/trunk/kcmPBSystem/portsnapprogress.cpp 2009-06-08 19:17:27 UTC (rev 4061)
+++ pcbsd/trunk/kcmPBSystem/portsnapprogress.cpp 2009-06-08 20:34:41 UTC (rev 4062)
@@ -110,13 +110,16 @@
}
else {
displayString += output;
- QStringList outputSplit = QStringList::split(" ", output);
- bool ok;
- outputSplit[1].toInt(&ok);
- if (ok)
- {
+ if ( output.indexOf(" ") != -1)
+ {
+ QStringList outputSplit = QStringList::split(" ", output);
+ bool ok;
+ outputSplit[1].toInt(&ok);
+ if (ok)
+ {
numberSteps += outputSplit[1].toInt();
- }
+ }
+ }
//Detect 'fetching n patches' condition
if ((output.find("patches") != -1) && (output.find("Applying") == -1)) {
taskProgress->setTotalSteps(numberSteps);
@@ -132,6 +135,7 @@
taskProgress->setProgress(0);
}
+
}
More information about the Commits
mailing list