aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-28 08:01:15 -0400
committerKen Moore <moorekou@gmail.com>2015-10-28 08:01:15 -0400
commitca3e2f9d793d8a839048f8daabd276556a861380 (patch)
treea909e82ad7af0d144d3a883dd7de9e8e3b8127ef
parentDisable the option to close the "Browser" tab when using column-view. (diff)
downloadlumina-ca3e2f9d793d8a839048f8daabd276556a861380.tar.gz
lumina-ca3e2f9d793d8a839048f8daabd276556a861380.tar.bz2
lumina-ca3e2f9d793d8a839048f8daabd276556a861380.zip
Remove the "waitForStarted()" function call in the external process launcher functions, and adjust the manual check for process started/running/finished to also account for the "Starting" State (only breaks out for the "NotRunning" process state now).
-rw-r--r--libLumina/LuminaUtils.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index 7b13adb9..987e3c5d 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -36,9 +36,9 @@ int LUtils::runCmd(QString cmd, QStringList args){
}else{
proc.start(cmd, args);
}
- if(!proc.waitForStarted(30000)){ return 1; } //process never started - max wait of 30 seconds
+ //if(!proc.waitForStarted(30000)){ return 1; } //process never started - max wait of 30 seconds
while(!proc.waitForFinished(300)){
- if(proc.state() != QProcess::Running){ break; } //somehow missed the finished signal
+ if(proc.state() == QProcess::NotRunning){ break; } //somehow missed the finished signal
QCoreApplication::processEvents();
}
int ret = proc.exitCode();
@@ -58,9 +58,9 @@ QStringList LUtils::getCmdOutput(QString cmd, QStringList args){
}else{
proc.start(cmd,args);
}
- if(!proc.waitForStarted(30000)){ return QStringList(); } //process never started - max wait of 30 seconds
- while(!proc.waitForFinished(500)){
- if(proc.state() != QProcess::Running){ break; } //somehow missed the finished signal
+ //if(!proc.waitForStarted(30000)){ return QStringList(); } //process never started - max wait of 30 seconds
+ while(!proc.waitForFinished(300)){
+ if(proc.state() != QProcess::NotRunning){ break; } //somehow missed the finished signal
QCoreApplication::processEvents();
}
QStringList out = QString(proc.readAllStandardOutput()).split("\n");
bgstack15