diff options
author | David Boddie <dboddie@trolltech.com> | 2009-03-31 15:38:40 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-03-31 15:38:40 (GMT) |
commit | 93ca19a8ff7570606b4c01cfb9953921f897aa6e (patch) | |
tree | 2c785d37b42a50d4f52517cfadf923d691c4e60c | |
parent | cf4d9e09afc72dfb474b497a95c872965335e341 (diff) | |
download | Qt-93ca19a8ff7570606b4c01cfb9953921f897aa6e.zip Qt-93ca19a8ff7570606b4c01cfb9953921f897aa6e.tar.gz Qt-93ca19a8ff7570606b4c01cfb9953921f897aa6e.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
-rw-r--r-- | src/corelib/io/qprocess.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index a9d8ee2..18618fc 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 |