summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnection.cpp
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2009-12-15 09:52:52 (GMT)
committerPeter Hartmann <peter.hartmann@nokia.com>2010-01-11 09:48:05 (GMT)
commit145fecc833926c307819752912e6833169799a53 (patch)
treee527d59a10244b7b6c71b8e63c5019a7dd34c2e4 /src/network/access/qhttpnetworkconnection.cpp
parentef5a985cf47c32bac0ddd3bae1edb7e922e7ec69 (diff)
downloadQt-145fecc833926c307819752912e6833169799a53.zip
Qt-145fecc833926c307819752912e6833169799a53.tar.gz
Qt-145fecc833926c307819752912e6833169799a53.tar.bz2
network internals: start HTTP GET requests right away when called
on the code path from QNetworkAccessManager::get() to QTcpSocket::write() there were two calls involved that were invoked via a QueuedConnection, which would in some occasions delay writing the data to the socket. This patch makes sure the data is written to the socket immediately, without returning to the event loop (only the HTTP backend was changed for that event, the other backends were not changed) Reviewed-by: Thiago Macieira Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network/access/qhttpnetworkconnection.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 44a0a79..2c56524 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -415,14 +415,13 @@ QHttpNetworkReply* QHttpNetworkConnectionPrivate::queueRequest(const QHttpNetwor
lowPriorityQueue.prepend(pair);
break;
}
- QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
+ // this used to be called via invokeMethod and a QueuedConnection
+ _q_startNextRequest();
return reply;
}
void QHttpNetworkConnectionPrivate::requeueRequest(const HttpMessagePair &pair)
{
- Q_Q(QHttpNetworkConnection);
-
QHttpNetworkRequest request = pair.first;
switch (request.priority()) {
case QHttpNetworkRequest::HighPriority:
@@ -433,7 +432,8 @@ void QHttpNetworkConnectionPrivate::requeueRequest(const HttpMessagePair &pair)
lowPriorityQueue.prepend(pair);
break;
}
- QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
+ // this used to be called via invokeMethod and a QueuedConnection
+ _q_startNextRequest();
}
void QHttpNetworkConnectionPrivate::dequeueAndSendRequest(QAbstractSocket *socket)