summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2015-11-14 15:06:34 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2016-01-04 13:43:01 +0000
commita9e1fc29cae050d6a2987388af4da13ba3379623 (patch)
treeb4121bf1c4b718d28c41282a776759400056608a /src/network
parent0cd73f23f2ed3752b488e70f901c1bc43eceba2e (diff)
Remove Windows-specific handling of the write notifiers on sockets
There is no need in special OS dependent code now, because the socket notifiers got the identical behavior on all platforms. Change-Id: I53ee51cd5eeff328e0b73f7325d2c9e883c5b213 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qabstractsocket.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index ed86dbbbae..10bea7e69e 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -799,25 +799,13 @@ void QAbstractSocketPrivate::canCloseNotification()
*/
bool QAbstractSocketPrivate::canWriteNotification()
{
-#if defined (Q_OS_WIN)
- if (socketEngine && socketEngine->isWriteNotificationEnabled())
- socketEngine->setWriteNotificationEnabled(false);
-#endif
-
#if defined (QABSTRACTSOCKET_DEBUG)
qDebug("QAbstractSocketPrivate::canWriteNotification() flushing");
#endif
bool dataWasWritten = writeToSocket();
- if (socketEngine) {
-#if defined (Q_OS_WIN)
- if (!writeBuffer.isEmpty())
- socketEngine->setWriteNotificationEnabled(true);
-#else
- if (writeBuffer.isEmpty() && socketEngine->bytesToWrite() == 0)
- socketEngine->setWriteNotificationEnabled(false);
-#endif
- }
+ if (socketEngine && writeBuffer.isEmpty() && socketEngine->bytesToWrite() == 0)
+ socketEngine->setWriteNotificationEnabled(false);
return dataWasWritten;
}