QAbstractSocket: enable read notification for unbuffered sockets

This restores behavior for UDP sockets as it was in 5.2.1. Change
13c246ee11 introduced a behavioral
change / regression in that respect.

Task-number: QTBUG-37489
Change-Id: I8f0b26d763dd66ea6edcc343e91ff5c9c7bdc0f2
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Peter Hartmann 2014-04-24 17:52:29 +02:00 committed by The Qt Project
parent eb1325047f
commit d29a750c0c

View File

@ -748,7 +748,7 @@ bool QAbstractSocketPrivate::canReadNotification()
return true;
}
if (isBuffered && socketEngine)
if ((isBuffered || socketType != QAbstractSocket::TcpSocket) && socketEngine)
socketEngine->setReadNotificationEnabled(readBufferMaxSize == 0 || readBufferMaxSize > q->bytesAvailable());
// reset the read socket notifier state if we reentered inside the