SynchronousProcess: Turn assertion into regular check

It is not an impossible condition that a process keeps hanging.

Change-Id: I87cfdb72ff8528c71b2add09e41bdf742cdfc8b6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Christian Kandeler
2016-10-07 14:44:17 +02:00
parent 52faf32770
commit 572b5447ff

View File

@@ -504,7 +504,9 @@ SynchronousProcessResponse SynchronousProcess::runBlocking(const QString &binary
}
}
QTC_ASSERT(d->m_process.state() == QProcess::NotRunning, return d->m_result);
if (d->m_process.state() != QProcess::NotRunning)
return d->m_result;
d->m_result.exitCode = d->m_process.exitCode();
if (d->m_result.result == SynchronousProcessResponse::StartFailed) {
if (d->m_process.exitStatus() != QProcess::NormalExit)