diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2021-05-31 17:30:53 +0300 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2021-05-31 21:50:07 +0300 |
commit | 64d6003f498d7259325719daba021d86d8deda95 (patch) | |
tree | 04727340dce1484ce044f6df1d17cada00e95a66 /src/corelib/io/qprocess_win.cpp | |
parent | 86542054d035c43f926eeb96b517108eb825831e (diff) |
Introduce QProcessPrivate::closeChannels()
Avoid duplicating code for both platforms.
Change-Id: Iae00023672b63e8539cf824fa3aaaff2bf9ae0c5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'src/corelib/io/qprocess_win.cpp')
-rw-r--r-- | src/corelib/io/qprocess_win.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index 388e163317..24a6e2109c 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -905,9 +905,7 @@ bool QProcessPrivate::startDetached(qint64 *pid) if (!openChannelsForDetached()) { // openChannel sets the error string - closeChannel(&stdinChannel); - closeChannel(&stdoutChannel); - closeChannel(&stderrChannel); + closeChannels(); return false; } @@ -955,9 +953,7 @@ bool QProcessPrivate::startDetached(qint64 *pid) setErrorAndEmit(QProcess::FailedToStart); } - closeChannel(&stdinChannel); - closeChannel(&stdoutChannel); - closeChannel(&stderrChannel); + closeChannels(); return success; } |