diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-09-30 17:04:41 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2014-10-01 15:31:45 +0200 |
commit | 377ef06aefd66c67c8d65d9e3cb3137b506c6014 (patch) | |
tree | c59dc91652bcc046aaa2fede8103f6cd9d4d7988 /src/corelib/doc/snippets | |
parent | 0175ad4d3ff3de93645b4a8b300ef3b7d6e15c04 (diff) |
Doc: fix misleading documentation of QProcess::set[Process]Environment
The example suggested that QProcess searches the PATH variable to find
the executable for the child process. That's not true. The environment
that's passed with setProcessEnvironment is just passed to the child
process. Removed the misleading example and fixed the function's
description.
Task-number: QTBUG-7321
Change-Id: I8ac4b6b02002eb0a99686f09bcf45f9bc677c8e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Diffstat (limited to 'src/corelib/doc/snippets')
-rw-r--r-- | src/corelib/doc/snippets/qprocess-environment/main.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/corelib/doc/snippets/qprocess-environment/main.cpp b/src/corelib/doc/snippets/qprocess-environment/main.cpp index d858746889..2e078eea6d 100644 --- a/src/corelib/doc/snippets/qprocess-environment/main.cpp +++ b/src/corelib/doc/snippets/qprocess-environment/main.cpp @@ -47,7 +47,6 @@ void startProcess() QProcess process; QStringList env = QProcess::systemEnvironment(); env << "TMPDIR=C:\\MyApp\\temp"; // Add an environment variable -env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=\\1;C:\\Bin"); process.setEnvironment(env); process.start("myapp"); //! [0] @@ -58,7 +57,6 @@ process.start("myapp"); QProcess process; QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); env.insert("TMPDIR", "C:\\MyApp\\temp"); // Add an environment variable -env.insert("PATH", env.value("Path") + ";C:\\Bin"); process.setProcessEnvironment(env); process.start("myapp"); //! [1] |