forked from qt-creator/qt-creator
Fix up QProcess::waitForFinished()
waitForFinish returns false if the process is no longer running at the time of the call. Handle that throughout the codebase. Change-Id: Ia7194095454e82efbd4eb88f2d55926bdd09e094 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -123,7 +123,7 @@ QList<Utils::EnvironmentItem> QnxUtils::qnxEnvironmentFromEnvFile(const QString
|
||||
|
||||
// waiting for finish
|
||||
QApplication::setOverrideCursor(Qt::BusyCursor);
|
||||
bool waitResult = process.waitForFinished(10000);
|
||||
bool waitResult = process.waitForFinished(10000) || process.state() == QProcess::NotRunning;
|
||||
QApplication::restoreOverrideCursor();
|
||||
if (!waitResult) {
|
||||
Utils::SynchronousProcess::stopProcess(process);
|
||||
|
||||
Reference in New Issue
Block a user