summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-03-31 15:38:40 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-03-31 15:42:52 (GMT)
commit9d4ddc4c1eb9c0aba31f99a0e8beb6f5a13188ca (patch)
tree030d2c0e9f8efdb0992a99548d1c5c78bdda0d43 /src
parentfb0c8a29f5ab04ac1a4697e2ae12eccea4dbca7e (diff)
downloadQt-9d4ddc4c1eb9c0aba31f99a0e8beb6f5a13188ca.zip
Qt-9d4ddc4c1eb9c0aba31f99a0e8beb6f5a13188ca.tar.gz
Qt-9d4ddc4c1eb9c0aba31f99a0e8beb6f5a13188ca.tar.bz2
Doc: Made it clearer that QProcess::start() only starts a new process if one is not already running.
Task-number: 231513 Reviewed-by: TrustMe
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qprocess.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index f16f996..a128482 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1476,11 +1476,15 @@ QByteArray QProcess::readAllStandardError()
}
/*!
- Starts the program \a program in a new process, passing the
- command line arguments in \a arguments. The OpenMode is set to \a
- mode. QProcess will immediately enter the Starting state. If the
- process starts successfully, QProcess will emit started();
- otherwise, error() will be emitted.
+ Starts the program \a program in a new process, if one is not already
+ running, passing the command line arguments in \a arguments. The OpenMode
+ is set to \a mode.
+
+ The QProcess object will immediately enter the Starting state. If the
+ process starts successfully, QProcess will emit started(); otherwise,
+ error() will be emitted. If the QProcess object is already running a
+ 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
process as separate arguments.
@@ -1577,10 +1581,10 @@ static QStringList parseCombinedArgString(const QString &program)
/*!
\overload
- Starts the program \a program in a new process. \a program is a
- single string of text containing both the program name and its
- arguments. The arguments are separated by one or more
- spaces. For example:
+ Starts the program \a program in a new process, if one is not already
+ running. \a program is a single string of text containing both the
+ program name and its arguments. The arguments are separated by one or
+ more spaces. For example:
\snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 5
@@ -1589,6 +1593,9 @@ static QStringList parseCombinedArgString(const QString &program)
\snippet doc/src/snippets/code/src_corelib_io_qprocess.cpp 6
+ If the QProcess object is already running a process, a warning may be
+ printed at the console, and the existing process will continue running.
+
Note that, on Windows, quotes need to be both escaped and quoted.
For example, the above code would be specified in the following
way to ensure that \c{"My Documents"} is used as the argument to