summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-05 19:32:01 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-05 19:32:01 (GMT)
commit4d0c9cfe654c82f99249142f5a51c2b8dd38d80b (patch)
tree06f2f732200ad115bc6a4af69a4db8468495de1e /src
parent20218cbb57a368c2d6981ca7001c6202ed885c24 (diff)
parent2479f19ce1df19380dc1fea451b8eb01ab3766dc (diff)
downloadQt-4d0c9cfe654c82f99249142f5a51c2b8dd38d80b.zip
Qt-4d0c9cfe654c82f99249142f5a51c2b8dd38d80b.tar.gz
Qt-4d0c9cfe654c82f99249142f5a51c2b8dd38d80b.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QHostInfo: Remove unused includes QNAM HTTP: Start more requests in once function call
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp28
-rw-r--r--src/network/kernel/qhostinfo.cpp4
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp1
-rw-r--r--src/network/kernel/qhostinfo_win.cpp1
4 files changed, 14 insertions, 20 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 559124f..def4c34 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -716,6 +716,7 @@ void QHttpNetworkConnectionPrivate::removeReply(QHttpNetworkReply *reply)
// This function must be called from the event loop. The only
// exception is documented in QHttpNetworkConnectionPrivate::queueRequest
+// although it is called _q_startNextRequest, it will actually start multiple requests when possible
void QHttpNetworkConnectionPrivate::_q_startNextRequest()
{
//resend the necessary ones.
@@ -733,26 +734,23 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest()
// dequeue new ones
- QAbstractSocket *socket = 0;
+ // return fast if there is nothing to do
+ if (highPriorityQueue.isEmpty() && lowPriorityQueue.isEmpty())
+ return;
+ // try to get a free AND connected socket
for (int i = 0; i < channelCount; ++i) {
- QAbstractSocket *chSocket = channels[i].socket;
- // try to get a free AND connected socket
if (!channels[i].isSocketBusy() && channels[i].socket->state() == QAbstractSocket::ConnectedState) {
- socket = chSocket;
- dequeueAndSendRequest(socket);
- break;
+ dequeueAndSendRequest(channels[i].socket);
}
}
- if (!socket) {
- for (int i = 0; i < channelCount; ++i) {
- QAbstractSocket *chSocket = channels[i].socket;
- // try to get a free unconnected socket
- if (!channels[i].isSocketBusy()) {
- socket = chSocket;
- dequeueAndSendRequest(socket);
- break;
- }
+ // return fast if there is nothing to do
+ if (highPriorityQueue.isEmpty() && lowPriorityQueue.isEmpty())
+ return;
+ // try to get a free unconnected socket
+ for (int i = 0; i < channelCount; ++i) {
+ if (!channels[i].isSocketBusy()) {
+ dequeueAndSendRequest(channels[i].socket);
}
}
diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp
index 2dd6485..311ee70 100644
--- a/src/network/kernel/qhostinfo.cpp
+++ b/src/network/kernel/qhostinfo.cpp
@@ -44,14 +44,10 @@
#include "QtCore/qscopedpointer.h"
#include <qabstracteventdispatcher.h>
-#include <private/qunicodetables_p.h>
#include <qcoreapplication.h>
#include <qmetaobject.h>
-#include <qregexp.h>
-#include <private/qnativesocketengine_p.h>
#include <qstringlist.h>
#include <qthread.h>
-#include <qtimer.h>
#include <qurl.h>
#ifdef Q_OS_UNIX
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index be06b6e..df98d5d 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -44,6 +44,7 @@
#include "qplatformdefs.h"
#include "qhostinfo_p.h"
+#include "private/qnativesocketengine_p.h"
#include "qiodevice.h"
#include <qbytearray.h>
#include <qlibrary.h>
diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp
index 4264f60..b30204b 100644
--- a/src/network/kernel/qhostinfo_win.cpp
+++ b/src/network/kernel/qhostinfo_win.cpp
@@ -50,7 +50,6 @@
#include "private/qnativesocketengine_p.h"
#include <ws2tcpip.h>
#include <qlibrary.h>
-#include <qtimer.h>
#include <qmutex.h>
#include <qurl.h>
#include <private/qmutexpool_p.h>