[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.2/kdelibs/kio/kio
From:       Andreas Hartmetz <ahartmetz () gmail ! com>
Date:       2009-01-21 18:09:54
Message-ID: 1232561394.674844.24101.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 914761 by ahartmetz:

Backport of commits 910708 and 913023 from trunk: Workaround for Qt bug

 M  +10 -3     tcpslavebase.cpp  


--- branches/KDE/4.2/kdelibs/kio/kio/tcpslavebase.cpp #914760:914761
@@ -198,9 +198,16 @@
         return -1;
     }
 
-    if (d->isBlocking && !d->socket.bytesAvailable()) {
-        d->socket.waitForReadyRead(-1);
-    } else {
+    if (!d->socket.bytesAvailable()) {
+        if (d->isBlocking) {
+            d->socket.waitForReadyRead(-1);
+        } else {
+            d->socket.waitForReadyRead(0);
+        }
+    } else if (d->socket.encryptionMode() != KTcpSocket::SslClientMode ||
+               QNetworkProxy::applicationProxy().type() == QNetworkProxy::NoProxy) {
+        // we only do this when it doesn't trigger Qt socket bugs. When it doesn't break anything
+        // it seems to help performance.
         d->socket.waitForReadyRead(0);
     }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic