summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-03-10 14:40:01 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-03-10 14:40:01 (GMT)
commit132566afcf2357cc3c77d940f22567d83951f21d (patch)
tree480f8a1b2f97f4eebbcfe8ca7374f4b37e73b247 /src/network
parentef53143777ccbd73799e597792a46b2676932cc2 (diff)
downloadQt-132566afcf2357cc3c77d940f22567d83951f21d.zip
Qt-132566afcf2357cc3c77d940f22567d83951f21d.tar.gz
Qt-132566afcf2357cc3c77d940f22567d83951f21d.tar.bz2
Fix network session use with the localhost optimisation in QNAB
QNetworkAccessBackend has an optimisation to not start the bearer when the destination is localhost. On symbian, if the bearer is specified but not started, then socket creation will fail. To fix this, delay pushing the network session until start() is called, at which point we know if the localhost optmisation will be applied or not. When using localhost, don't specify any network session - symbian socket engine will create the socket successfully in thie case. Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qnetworkaccessbackend.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp
index 8f5a3da..6220abe 100644
--- a/src/network/access/qnetworkaccessbackend.cpp
+++ b/src/network/access/qnetworkaccessbackend.cpp
@@ -96,11 +96,6 @@ QNetworkAccessBackend *QNetworkAccessManagerPrivate::findBackend(QNetworkAccessM
QNetworkAccessBackend *backend = (*it)->create(op, request);
if (backend) {
backend->manager = this;
-#ifndef QT_NO_BEARERMANAGEMENT
- //copy network session down to the backend
- if (networkSession)
- backend->setProperty("_q_networksession", QVariant::fromValue(networkSession));
-#endif
return backend; // found a factory that handled our request
}
++it;
@@ -374,6 +369,8 @@ bool QNetworkAccessBackend::start()
if (manager->networkSession->isOpen() &&
manager->networkSession->state() == QNetworkSession::Connected) {
+ //copy network session down to the backend
+ setProperty("_q_networksession", QVariant::fromValue(manager->networkSession));
open();
return true;
}