diff options
author | Aleksei Timofeyev <aleksei.timofeyev@gmail.com> | 2016-04-22 12:57:17 +0500 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2016-05-30 09:05:43 +0000 |
commit | 886086f5d39a317443018689f817e8eb8ecb0be8 (patch) | |
tree | a6502c3bf72f920791f3f622359111012e73ef58 /src/corelib | |
parent | 1d9d16515853932205d4ca82a385dfb9c2221394 (diff) |
QWindowsPipeWriter: Discard queued signals in stop()
The _q_queueBytesWritten signal may be already queued from the event loop
at the time when stop() is called. We do not want to emit signals once
stopped, so reset all respective state variables.
Change-Id: I343e1702955e0bbc1d11930d19e75dab6e129b4c
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qwindowspipewriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qwindowspipewriter.cpp b/src/corelib/io/qwindowspipewriter.cpp index 839dc8a19c..3731aba97b 100644 --- a/src/corelib/io/qwindowspipewriter.cpp +++ b/src/corelib/io/qwindowspipewriter.cpp @@ -202,6 +202,8 @@ bool QWindowsPipeWriter::write(const QByteArray &ba) void QWindowsPipeWriter::stop() { stopped = true; + bytesWrittenPending = false; + pendingBytesWrittenValue = 0; if (writeSequenceStarted) { if (!qt_cancelIo(handle, &overlapped)) { const DWORD dwError = GetLastError(); |