From 50a8a5e7959ca315e812413661a76576b7c3bbb8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 Sep 2013 22:06:26 +0200 Subject: add QProcess::InputChannelMode this enables forwarding standard input from the parent process. Change-Id: I7ee72b9842acc96320d4da693b95dd15d9a7b4d4 Reviewed-by: Simon Hausmann Reviewed-by: Lars Knoll Reviewed-by: Olivier Goffart Reviewed-by: Friedemann Kleint Reviewed-by: Oliver Wolff --- tests/auto/corelib/io/qprocess/testForwarding/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/auto/corelib/io/qprocess/testForwarding') diff --git a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp b/tests/auto/corelib/io/qprocess/testForwarding/main.cpp index deff2b95ad..42394f6414 100644 --- a/tests/auto/corelib/io/qprocess/testForwarding/main.cpp +++ b/tests/auto/corelib/io/qprocess/testForwarding/main.cpp @@ -48,7 +48,7 @@ int main(int argc, char **argv) { QCoreApplication app(argc, argv); - if (argc < 2) + if (argc < 3) return 13; #ifndef QT_NO_PROCESS @@ -59,12 +59,17 @@ int main(int argc, char **argv) if (process.processChannelMode() != mode) return 1; + QProcess::InputChannelMode inmode = (QProcess::InputChannelMode)atoi(argv[2]); + process.setInputChannelMode(inmode); + if (process.inputChannelMode() != inmode) + return 11; + process.start("testProcessEcho2/testProcessEcho2"); if (!process.waitForStarted(5000)) return 2; - if (process.write("forwarded") != 9) + if (inmode == QProcess::ManagedInputChannel && process.write("forwarded") != 9) return 3; process.closeWriteChannel(); -- cgit v1.2.3