Obsolete Members for QProcess
The following class members are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
Public Functions
| QStringList | environment() const (obsolete) |
| ProcessChannelMode | readChannelMode() const (obsolete) |
| void | setEnvironment(const QStringList & environment) (obsolete) |
| void | setReadChannelMode(ProcessChannelMode mode) (obsolete) |
Signals
| void | finished(int exitCode) (obsolete) |
Member Function Documentation
QStringList QProcess::environment() const
Returns the environment that QProcess will use when starting a process, or an empty QStringList if no environment has been set using setEnvironment() or setEnvironmentHash(). If no environment has been set, the environment of the calling process will be used.
Note: The environment settings are ignored on Windows CE, as there is no concept of an environment.
See also processEnvironment(), setEnvironment(), and systemEnvironment().
void QProcess::finished(int exitCode) [signal]
This is an overloaded function.
Use finished(int exitCode, QProcess::ExitStatus status) instead.
ProcessChannelMode QProcess::readChannelMode() const
Returns the read channel mode of the QProcess. This function is equivalent to processChannelMode()
See also setReadChannelMode() and processChannelMode().
void QProcess::setEnvironment(const QStringList & environment)
Sets the environment that QProcess will use when starting a process to the environment specified which consists of a list of key=value pairs.
For example, the following code adds the C:\\BIN directory to the list of executable paths (PATHS) on Windows:
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");
Note: This function is less efficient than the setProcessEnvironment() function.
See also environment(), setProcessEnvironment(), and systemEnvironment().
void QProcess::setReadChannelMode(ProcessChannelMode mode)
Use setProcessChannelMode(mode) instead.
See also readChannelMode() and setProcessChannelMode().