diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-07-06 11:56:38 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-07-06 12:10:47 (GMT) |
commit | 4fe7291edcac2688f042a11ff5c23374c6c0375d (patch) | |
tree | 5875dabdc06b69b3d089e030348fa5e6c45336c2 /src/corelib/io/qprocess.cpp | |
parent | 92b6ca830f279cfa9d37946f1fd72843b24e704b (diff) | |
download | Qt-4fe7291edcac2688f042a11ff5c23374c6c0375d.zip Qt-4fe7291edcac2688f042a11ff5c23374c6c0375d.tar.gz Qt-4fe7291edcac2688f042a11ff5c23374c6c0375d.tar.bz2 |
add setNativeArguments() and nativeArguments()
this function enables starting subprocesses which need command lines
which cannot be constructed via the portable list-based api. such cases
would be programs which need quoting rules which diverge from the msvc
runtime.
Reviewed-by: joerg
Task-number: QTBUG-7620 (and various others which boil down to that)
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r-- | src/corelib/io/qprocess.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 4c21a40..9bc4063 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1377,6 +1377,50 @@ void QProcess::setStandardOutputProcess(QProcess *destination) dto->stdinChannel.pipeFrom(dfrom); } +#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN) + +/*! + \since 4.7 + + Returns the additional native command line arguments for the program. + + \note This function is available only on the Windows and Symbian + platforms. + + \sa setNativeArguments() +*/ +QString QProcess::nativeArguments() const +{ + Q_D(const QProcess); + return d->nativeArguments; +} + +/*! + \since 4.7 + \overload + + Sets additional native command line arguments for the program. + + On operating systems where the system API for passing command line + arguments to a subprocess natively uses a single string, one can + conceive command lines which cannot be passed via QProcess's portable + list-based API. In such cases this function must be used to set a + string which is \e appended to the string composed from the usual + argument list, with a delimiting space. + + \note This function is available only on the Windows and Symbian + platforms. + + \sa nativeArguments() +*/ +void QProcess::setNativeArguments(const QString &arguments) +{ + Q_D(QProcess); + d->nativeArguments = arguments; +} + +#endif + /*! If QProcess has been assigned a working directory, this function returns the working directory that the QProcess will enter before the program has |