WinCE: Remove QIncrementalSleepTimer from QProcess::waitForFinished
Remove a superfluous loop and thus the usage of QIncrementalSleepTimer from QProcess::waitForFinished. We just wait for the process handle. There's no need for a loop that checks multiple wait conditions. This enables us to remove QWindowsPipeWriter from the Windows CE port in a subsequent commit. Change-Id: If6a82405227cf145263dba3726bae959e6871d0e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>bb10
parent
50ab7c16d4
commit
6e823d2832
|
|
@ -235,20 +235,14 @@ bool QProcessPrivate::waitForFinished(int msecs)
|
|||
qDebug("QProcessPrivate::waitForFinished(%d)", msecs);
|
||||
#endif
|
||||
|
||||
QIncrementalSleepTimer timer(msecs);
|
||||
if (!pid)
|
||||
return true;
|
||||
|
||||
forever {
|
||||
if (!pid)
|
||||
return true;
|
||||
|
||||
if (WaitForSingleObject(pid->hProcess, timer.nextSleepTime()) == WAIT_OBJECT_0) {
|
||||
_q_processDied();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (timer.hasTimedOut())
|
||||
break;
|
||||
if (WaitForSingleObject(pid->hProcess, msecs == -1 ? INFINITE : msecs) == WAIT_OBJECT_0) {
|
||||
_q_processDied();
|
||||
return true;
|
||||
}
|
||||
|
||||
setError(QProcess::Timedout);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue