remove wait calls in tst_QProcess::simpleStart
Instead of calling different wait functions on different platforms, we use QTRY_COMPARE to check the process state. Change-Id: I6489cabce9e63f9c8b1036f3cccbf35b52df72e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
This commit is contained in:
parent
e8c3316ab0
commit
5cfac290ca
@ -267,15 +267,7 @@ void tst_QProcess::simpleStart()
|
||||
QCOMPARE(process->state(), QProcess::Running);
|
||||
QVERIFY2(process->waitForStarted(5000), qPrintable(process->errorString()));
|
||||
QCOMPARE(process->state(), QProcess::Running);
|
||||
#if defined(Q_OS_WINCE)
|
||||
// Note: This actually seems incorrect, it will only exit the while loop when finishing fails
|
||||
while (process->waitForFinished(5000))
|
||||
{ }
|
||||
#else
|
||||
while (process->waitForReadyRead(5000))
|
||||
{ }
|
||||
#endif
|
||||
QCOMPARE(int(process->state()), int(QProcess::NotRunning));
|
||||
QTRY_COMPARE(process->state(), QProcess::NotRunning);
|
||||
|
||||
delete process;
|
||||
process = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user