diff options
author | Laszlo Papp <lpapp@kde.org> | 2022-07-23 12:56:04 +0100 |
---|---|---|
committer | Laszlo Papp <lpapp@kde.org> | 2022-07-23 16:05:38 +0100 |
commit | a1ca0c99deef5fcacb05d004ce69025886a220a4 (patch) | |
tree | 1fe2fc2e4bd4a18f8625fe70fb4630198f7ea234 /src/corelib/io | |
parent | 4fde012a90ff6f791c672b8e97bf592171514392 (diff) |
QProcess: Extend the setStandardOutputFile doc
It seems to be a hidden gem that one can stop redirecting the standard
output to a file without creating a new QProcess instance.
I have discovered this while browsing the private implementation of
QProcess trying to answer this question:
https://stackoverflow.com/a/72989131/2682142
I believe that this should be documented unless it is not meant to be
guaranteed behavior.
Change-Id: I180764d4cc56f6395d6d65942077e3ede63c71ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qprocess.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 276190426c..e116fe861d 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1378,6 +1378,9 @@ void QProcess::setStandardInputFile(const QString &fileName) Calling setStandardOutputFile() after the process has started has no effect. + If \a fileName is an empty string, it stops redirecting the standard + output. This is useful for restoring the standard output after redirection. + \sa setStandardInputFile(), setStandardErrorFile(), setStandardOutputProcess() */ |