From 0f6b3a01e4c6fc7e4c2603b3dfcf3c0f81090ba9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 5 Jun 2014 14:32:02 -0700 Subject: 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 --- src/corelib/io/qprocess_unix.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/io/qprocess_unix.cpp') diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index 97e8add9fa..4147191f08 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -377,7 +377,7 @@ void QProcessPrivate::destroyPipe(int *pipe) } } -void QProcessPrivate::destroyChannel(Channel *channel) +void QProcessPrivate::closeChannel(Channel *channel) { destroyPipe(channel->pipe); } @@ -387,7 +387,7 @@ void QProcessPrivate::destroyChannel(Channel *channel) This function must be called in order: stdin, stdout, stderr */ -bool QProcessPrivate::createChannel(Channel &channel) +bool QProcessPrivate::openChannel(Channel &channel) { Q_Q(QProcess); @@ -573,9 +573,9 @@ void QProcessPrivate::startProcess() processManager()->start(); // Initialize pipes - if (!createChannel(stdinChannel) || - !createChannel(stdoutChannel) || - !createChannel(stderrChannel) || + if (!openChannel(stdinChannel) || + !openChannel(stdoutChannel) || + !openChannel(stderrChannel) || qt_create_pipe(childStartedPipe) != 0 || qt_create_pipe(deathPipe) != 0) { processError = QProcess::FailedToStart; -- cgit v1.2.3