summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnectionchannel.cpp
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-08-27 14:34:30 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-08-27 14:36:06 (GMT)
commit2c6cfddf3e1f3674f0b70880c12f6812650cd08d (patch)
tree024d4e7f98bcd6763c708deda5bceb3c6fef5945 /src/network/access/qhttpnetworkconnectionchannel.cpp
parentdd9499f786432687aada7c41d2073869d56f0b59 (diff)
downloadQt-2c6cfddf3e1f3674f0b70880c12f6812650cd08d.zip
Qt-2c6cfddf3e1f3674f0b70880c12f6812650cd08d.tar.gz
Qt-2c6cfddf3e1f3674f0b70880c12f6812650cd08d.tar.bz2
QNAM HTTP Code: Optimize connectionCloseEnabled
Was called pretty often, therefore we now calculate this once and save it in a bool. Reviewed-by: TrustMe
Diffstat (limited to 'src/network/access/qhttpnetworkconnectionchannel.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 05c6ebe..d880f60 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -524,7 +524,7 @@ void QHttpNetworkConnectionChannel::allDone()
handleStatus();
// ### at this point there should be no more data on the socket
// close if server requested
- if (reply->d_func()->connectionCloseEnabled())
+ if (reply->d_func()->isConnectionCloseEnabled())
close();
// queue the finished signal, this is required since we might send new requests from
// slot connected to it. The socket will not fire readyRead signal, if we are already
@@ -539,7 +539,7 @@ void QHttpNetworkConnectionChannel::allDone()
// move next from pipeline to current request
if (!alreadyPipelinedRequests.isEmpty()) {
- if (resendCurrent || reply->d_func()->connectionCloseEnabled() || socket->state() != QAbstractSocket::ConnectedState) {
+ if (resendCurrent || reply->d_func()->isConnectionCloseEnabled() || socket->state() != QAbstractSocket::ConnectedState) {
// move the pipelined ones back to the main queue
requeueCurrentlyPipelinedRequests();
} else {
@@ -584,7 +584,7 @@ void QHttpNetworkConnectionChannel::detectPipeliningSupport()
// check for HTTP/1.1
&& (reply->d_func()->majorVersion == 1 && reply->d_func()->minorVersion == 1)
// check for not having connection close
- && (!reply->d_func()->connectionCloseEnabled())
+ && (!reply->d_func()->isConnectionCloseEnabled())
// check if it is still connected
&& (socket->state() == QAbstractSocket::ConnectedState)
) {