summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qprocess/testForwarding
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-09-03 22:06:26 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-05 21:17:44 +0200
commit50a8a5e7959ca315e812413661a76576b7c3bbb8 (patch)
treefadd591bb515323705ee372ea069b58471eedb07 /tests/auto/corelib/io/qprocess/testForwarding
parentfba0a307914772b286e8f315e0d1dec5ce7935f8 (diff)
add QProcess::InputChannelMode
this enables forwarding standard input from the parent process. Change-Id: I7ee72b9842acc96320d4da693b95dd15d9a7b4d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'tests/auto/corelib/io/qprocess/testForwarding')
-rw-r--r--tests/auto/corelib/io/qprocess/testForwarding/main.cpp9
1 files changed, 7 insertions, 2 deletions
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();