summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qprocess/testForwarding
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-09-03 19:56:22 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-05 11:18:59 +0200
commit60f8b2f4d019e49402fbfd91fddeb4139dd973ac (patch)
treea19461e0e7c3ecd99e243ae2061888186827a13e /tests/auto/corelib/io/qprocess/testForwarding
parent60faa0f70b137c567769099292606b331f1a442e (diff)
micro-optimization/-clarification
close stdin and let the process finish right away instead of first waiting for a reaction (which is not supposed to come) and then finishing. Change-Id: Ifcf200eead5ed95217843e105f9d2dbb5398d646 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto/corelib/io/qprocess/testForwarding')
-rw-r--r--tests/auto/corelib/io/qprocess/testForwarding/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp b/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
index e69ae173f4..d9571141ae 100644
--- a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
+++ b/tests/auto/corelib/io/qprocess/testForwarding/main.cpp
@@ -57,12 +57,12 @@ int main()
if (process.write("forwarded\n") != 10)
return -1;
- process.waitForReadyRead(250);
- if (process.bytesAvailable() != 0)
+ process.closeWriteChannel();
+ if (!process.waitForFinished(5000))
return -1;
- process.closeWriteChannel();
- process.waitForFinished(5000);
+ if (process.bytesAvailable() != 0)
+ return -1;
#endif
return 0;
}