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>
This commit is contained in:
parent
1d9d165158
commit
886086f5d3
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user