summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-09-03 21:52:22 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-05 21:17:39 +0200
commitfba0a307914772b286e8f315e0d1dec5ce7935f8 (patch)
tree10908de0f4da40445ff5db2072a7e7ccc532a0ef /src/corelib/io/qprocess.cpp
parentdd9d6b3d5b21281707440db4413707e1d818889e (diff)
add QProcess::Forwarded{Output,Error}Channel
Change-Id: Ifc5ed20c38f3228ef25c28681f296d0456b61abe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r--src/corelib/io/qprocess.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index d473281acc..27a8bce3fe 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -533,7 +533,11 @@ void QProcessPrivate::Channel::clear()
MergedChannels before starting the process to activative
this feature. You also have the option of forwarding the output of
the running process to the calling, main process, by passing
- ForwardedChannels as the argument.
+ ForwardedChannels as the argument. It is also possible to forward
+ only one of the output channels - typically one would use
+ ForwardedErrorChannel, but ForwardedOutputChannel also exists.
+ Note that using channel forwarding is typically a bad idea in GUI
+ applications - you should present errors graphically instead.
Certain processes need special environment settings in order to
operate. You can set environment variables for your process by
@@ -625,6 +629,17 @@ void QProcessPrivate::Channel::clear()
writes to its standard output and standard error will be written
to the standard output and standard error of the main process.
+ \value ForwardedErrorChannel QProcess manages the standard output
+ of the running process, but forwards its standard error onto the
+ main process. This reflects the typical use of command line tools
+ as filters, where the standard output is redirected to another
+ process or a file, while standard error is printed to the console
+ for diagnostic purposes.
+ (This value was introduced in Qt 5.2.)
+
+ \value ForwardedOutputChannel Complementary to ForwardedErrorChannel.
+ (This value was introduced in Qt 5.2.)
+
\note Windows intentionally suppresses output from GUI-only
applications to inherited consoles.
This does \e not apply to output redirected to files or pipes.