diff options
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/libLumina/LuminaUtils.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp index 1d0e186c..76d61f8d 100644 --- a/src-qt5/core/libLumina/LuminaUtils.cpp +++ b/src-qt5/core/libLumina/LuminaUtils.cpp @@ -34,15 +34,19 @@ inline QStringList ProcessRun(QString cmd, QStringList args){ proc.setProcessEnvironment(env); proc.setProcessChannelMode(QProcess::MergedChannels); if(args.isEmpty()){ - proc.start(cmd); + proc.start(cmd, QIODevice::ReadOnly); }else{ - proc.start(cmd,args); + proc.start(cmd,args ,QIODevice::ReadOnly); } - while(!proc.waitForFinished(500)){ + QString info; + while(!proc.waitForFinished(1000)){ if(proc.state() == QProcess::NotRunning){ break; } //somehow missed the finished signal + QString tmp = proc.readAllStandardOutput(); + if(tmp.isEmpty()){ proc.terminate(); } + else{ info.append(tmp); } } out[0] = QString::number(proc.exitCode()); - out[1] = QString(proc.readAllStandardOutput()); + out[1] = info+QString(proc.readAllStandardOutput()); return out; } //============= |