diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-06-05 14:32:02 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-12 17:54:11 +0200 |
commit | 0f6b3a01e4c6fc7e4c2603b3dfcf3c0f81090ba9 (patch) | |
tree | ee03febce8472f889df6bd648a9477c68267df90 /src/corelib/io/qprocess.cpp | |
parent | 15a0a6e8c54ad52fe9f02e637f6a977fa794257b (diff) |
Rename QProcessPrivate::destroyChannel to closeChannel
The QProcessPrivate::Channel object contains some structures that may
survive the closing of the pipe, so calling this function "destroy" is
incorrect. Let it be just the closing.
For symmetry, the createChannel() function is renamed to openChannel().
Change-Id: I2899214c6e4c25835390b10ccf3931315a91589e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r-- | src/corelib/io/qprocess.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index cfe5a68fc8..a3fca5bfe0 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -886,9 +886,9 @@ void QProcessPrivate::cleanup() notifier = 0; } #endif - destroyChannel(&stdoutChannel); - destroyChannel(&stderrChannel); - destroyChannel(&stdinChannel); + closeChannel(&stdoutChannel); + closeChannel(&stderrChannel); + closeChannel(&stdinChannel); destroyPipe(childStartedPipe); destroyPipe(deathPipe); #ifdef Q_OS_UNIX @@ -906,7 +906,7 @@ bool QProcessPrivate::_q_canReadStandardOutput() if (available == 0) { if (stdoutChannel.notifier) stdoutChannel.notifier->setEnabled(false); - destroyChannel(&stdoutChannel); + closeChannel(&stdoutChannel); #if defined QPROCESS_DEBUG qDebug("QProcessPrivate::canReadStandardOutput(), 0 bytes available"); #endif @@ -962,7 +962,7 @@ bool QProcessPrivate::_q_canReadStandardError() if (available == 0) { if (stderrChannel.notifier) stderrChannel.notifier->setEnabled(false); - destroyChannel(&stderrChannel); + closeChannel(&stderrChannel); return false; } @@ -1016,7 +1016,7 @@ bool QProcessPrivate::_q_canWrite() qint64 written = writeToStdin(stdinChannel.buffer.readPointer(), stdinChannel.buffer.nextDataBlockSize()); if (written < 0) { - destroyChannel(&stdinChannel); + closeChannel(&stdinChannel); processError = QProcess::WriteError; q->setErrorString(QProcess::tr("Error writing to process")); emit q->error(processError); @@ -1160,7 +1160,7 @@ void QProcessPrivate::closeWriteChannel() // instead. flushPipeWriter(); #endif - destroyChannel(&stdinChannel); + closeChannel(&stdinChannel); } /*! |