diff options
author | Alex Trotsenko <alex1973tr@gmail.com> | 2015-07-22 10:56:06 +0300 |
---|---|---|
committer | Alex Trotsenko <alex1973tr@gmail.com> | 2016-01-29 09:14:44 +0000 |
commit | 7ff655360f1bebb657a7c035211058b340bf9f57 (patch) | |
tree | 08911a78216b58022c53aff4d232049e5a1dd803 /src/corelib/io/qprocess_win.cpp | |
parent | 8f92baf5c946a93430e73adc79b4435060840777 (diff) |
Integrate QProcess into QIODevice's multistreaming infrastructure
As a result, this patch eliminates double-buffering in QProcess.
Change-Id: I436faa4a5ffc28ce77f959dd6089bef400ac39f6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/io/qprocess_win.cpp')
-rw-r--r-- | src/corelib/io/qprocess_win.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index 6097e85052..cf0536c2de 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -652,7 +652,7 @@ bool QProcessPrivate::waitForReadyRead(int msecs) QIncrementalSleepTimer timer(msecs); forever { - if (!stdinChannel.buffer.isEmpty() && !_q_canWrite()) + if (!writeBuffer.isEmpty() && !_q_canWrite()) return false; if (stdinChannel.writer && stdinChannel.writer->waitForWrite(0)) timer.resetIncrements(); @@ -690,7 +690,7 @@ bool QProcessPrivate::waitForBytesWritten(int msecs) // If we don't have pending data, and our write buffer is // empty, we fail. - if (!pendingDataInPipe && stdinChannel.buffer.isEmpty()) + if (!pendingDataInPipe && writeBuffer.isEmpty()) return false; // If we don't have pending data and we do have data in our @@ -754,7 +754,7 @@ bool QProcessPrivate::waitForFinished(int msecs) QIncrementalSleepTimer timer(msecs); forever { - if (!stdinChannel.buffer.isEmpty() && !_q_canWrite()) + if (!writeBuffer.isEmpty() && !_q_canWrite()) return false; if (stdinChannel.writer && stdinChannel.writer->waitForWrite(0)) timer.resetIncrements(); |