winrt: only emit readRead signal if the notifyOnRead flag is set

Change-Id: Ie52ddc8b0f70ad64d8f503b1942b9da6b72d6c99
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
This commit is contained in:
Oliver Wolff 2016-04-07 15:48:26 +02:00
parent 1e229c7041
commit db051bc04f

View File

@ -1197,7 +1197,8 @@ HRESULT QNativeSocketEnginePrivate::handleClientConnection(IStreamSocketListener
args->get_Socket(&socket);
pendingConnections.append(socket);
emit q->connectionReady();
emit q->readReady();
if (notifyOnRead)
emit q->readReady();
return S_OK;
}
@ -1381,7 +1382,8 @@ HRESULT QNativeSocketEnginePrivate::handleNewDatagram(IDatagramSocket *socket, I
hr = reader->ReadBytes(length, reinterpret_cast<BYTE *>(datagram.data.data()));
RETURN_OK_IF_FAILED("Could not read datagram");
pendingDatagrams.append(datagram);
emit q->readReady();
if (notifyOnRead)
emit q->readReady();
return S_OK;
}