summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-08-17 15:15:59 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-08-17 15:15:59 (GMT)
commit2c433296b3f570e92e4279ffbdbaecd48f018ec7 (patch)
tree5b98e2b1e48a037f6a7ffbeae1d0f5d8fdffed13 /src/corelib/io
parentd0b0f7b5b44fbec26a67b4afb3a08143b5de4b57 (diff)
downloadQt-2c433296b3f570e92e4279ffbdbaecd48f018ec7.zip
Qt-2c433296b3f570e92e4279ffbdbaecd48f018ec7.tar.gz
Qt-2c433296b3f570e92e4279ffbdbaecd48f018ec7.tar.bz2
Doc: Clarified that arguments should be passed as separate strings.
Task-number: 178753 Reviewed-by: Trust Me
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qprocess.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 133d51e..4715eb7 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -155,8 +155,16 @@ void QProcessPrivate::Channel::clear()
\mainclass
\reentrant
+ \section1 Running a Process
+
To start a process, pass the name and command line arguments of
- the program you want to run as arguments to start(). For example:
+ the program you want to run as arguments to start(). Arguments
+ are supplied as individual strings in a QStringList.
+
+ For example, the following code snippet runs the analog clock
+ example in the Motif style on X11 platforms by passing strings
+ containing "-style" and "motif" as two items in the list of
+ arguments:
\snippet doc/src/snippets/qprocess/qprocess-simpleexecution.cpp 0
\dots
@@ -1565,16 +1573,16 @@ QByteArray QProcess::readAllStandardError()
process, a warning may be printed at the console, and the existing
process will continue running.
- Note that arguments that contain spaces are not passed to the
+ \note Arguments that contain spaces are not passed to the
process as separate arguments.
- \bold{Windows:} Arguments that contain spaces are wrapped in quotes.
-
\note Processes are started asynchronously, which means the started()
and error() signals may be delayed. Call waitForStarted() to make
sure the process has started (or has failed to start) and those signals
have been emitted.
+ \bold{Windows:} Arguments that contain spaces are wrapped in quotes.
+
\sa pid(), started(), waitForStarted()
*/
void QProcess::start(const QString &program, const QStringList &arguments, OpenMode mode)
@@ -1834,7 +1842,7 @@ bool QProcess::startDetached(const QString &program,
otherwise returns false. If the calling process exits, the
detached process will continue to live.
- Note that arguments that contain spaces are not passed to the
+ \note Arguments that contain spaces are not passed to the
process as separate arguments.
\bold{Unix:} The started process will run in its own session and act