summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-11 22:32:04 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-11 22:32:04 (GMT)
commit45540361bb238ee2d83aad7fd95ac6700692a709 (patch)
tree6b5069fcecb589ef9f4c7a487efcf1bc2ccba8ad /src
parentcf69144f2b5511c6e4e81bd9da8ee6acd2340e5c (diff)
downloadQt-45540361bb238ee2d83aad7fd95ac6700692a709.zip
Qt-45540361bb238ee2d83aad7fd95ac6700692a709.tar.gz
Qt-45540361bb238ee2d83aad7fd95ac6700692a709.tar.bz2
Fix creation of QNetworkSession.
If QNAM::setConfiguration(QNetworkConfiguration()) is called before the first network request is processed new session using the default configuration would be incorrectly created.
Diffstat (limited to 'src')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 7bb1399..789d57b 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -886,8 +886,6 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
d->createSession(manager.defaultConfiguration());
else
d->createSession(manager.configurationFromIdentifier(d->networkConfiguration));
-
- d->initializeSession = false;
} else if (d->networkSession) {
d->networkSession->setSessionProperty(QLatin1String("AutoCloseSessionTimeout"), -1);
}
@@ -1207,6 +1205,8 @@ void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &co
{
Q_Q(QNetworkAccessManager);
+ initializeSession = false;
+
if (networkSession)
delete networkSession;