From 4df61b4bad57a08a30b8898eb73c720bc9c328a8 Mon Sep 17 00:00:00 2001 From: Martin Petersson Date: Fri, 18 Feb 2011 10:38:00 +0100 Subject: QAbstractSocket: Do not always change notifier on setReadBufferSize When the connecting process is in progress we should not enable the read notifier. This will be done when we are connected. This fixes the tst_qnetworkreply proxyChange() on Windows. Reviewed-by: Markus Goetz --- src/network/socket/qabstractsocket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index ead9897..9c82db8 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -2624,7 +2624,7 @@ void QAbstractSocket::setReadBufferSize(qint64 size) // ensure that the read notification is enabled if we've now got // room in the read buffer // but only if we're not inside canReadNotification -- that will take care on its own - if (size == 0 || d->readBuffer.size() < size) + if ((size == 0 || d->readBuffer.size() < size) && d->state == Connected) // Do not change the notifier unless we are connected. d->socketEngine->setReadNotificationEnabled(true); } } -- cgit v0.12