LocalSocket: Do not return early in waitForReadyRead

Do not return early on Windows if bytes are still in the buffer.
This is not in line with the behavior on other platforms,
and also breaks apps where the caller knows that the
bytes available are insufficient.

[ChangeLog][Network][QLocalSocket] On Windows, waitForReadyRead
now always waits for more data, even if bytes are still in the
buffer.

Task-number: QTBUG-16688
Change-Id: I1425a5780c7707295374934a6b5446ff8e148cc8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Kai Koehne 2015-02-16 08:52:36 +01:00
parent effc6b4cd1
commit 478f319df9

View File

@ -405,9 +405,6 @@ bool QLocalSocket::waitForReadyRead(int msecs)
{ {
Q_D(QLocalSocket); Q_D(QLocalSocket);
if (bytesAvailable() > 0)
return true;
if (d->state != QLocalSocket::ConnectedState) if (d->state != QLocalSocket::ConnectedState)
return false; return false;