Commit 5f53b956 authored by hjk's avatar hjk

Android: Avoid endless loop in the presence of crashed process

while (!proc.waitForFinished(200)) { ... } effectively behaves as
endless loop if proc is already crashed at that time.

Change-Id: Ia2228ceddc9c45a37816209deb7e4fd69c7ab7b9
Reviewed-by: default avatarBogDan Vatra <bogdan@kdab.com>
parent 49ffbb04
......@@ -354,7 +354,7 @@ AndroidDeployQtStep::DeployResult AndroidDeployQtStep::runDeploy(QFutureInterfac
.arg(QDir::toNativeSeparators(m_command), args),
BuildStep::MessageOutput);
while (!m_process->waitForFinished(200)) {
while (m_process->state() != QProcess::NotRunning && !m_process->waitForFinished(200)) {
if (fi.isCanceled()) {
m_process->kill();
m_process->waitForFinished();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment