summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorVille Pernu <ville.pernu@nokia.com>2010-12-17 09:08:53 (GMT)
committerVille Pernu <ville.pernu@nokia.com>2010-12-17 09:08:53 (GMT)
commitd238b0ba236da4c3c33c0707d8dd6f5e5903d6c0 (patch)
treeaf74e8bac0d24fa21cc5e1f472c0180a734c9a52 /src/network
parent14b4c009f9b0b83d16aec9f5b396f97efd49458c (diff)
downloadQt-d238b0ba236da4c3c33c0707d8dd6f5e5903d6c0.zip
Qt-d238b0ba236da4c3c33c0707d8dd6f5e5903d6c0.tar.gz
Qt-d238b0ba236da4c3c33c0707d8dd6f5e5903d6c0.tar.bz2
Fix waitForOpened not working with already active configuration
When an active QNetworkConfiguration is already in use (e.g. browser already open), the QNetworkSession::waitForOpened() did not work properly. Changed one if-statement in the function to adapt to the scenario. Reviewed-by: Perttu Pohjonen Task-number: QTBUG-565
Diffstat (limited to 'src/network')
-rw-r--r--src/network/bearer/qnetworksession.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 226c3c5..db1a37c 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -310,8 +310,9 @@ bool QNetworkSession::waitForOpened(int msecs)
if (d->isOpen)
return true;
- if (d->state != Connecting)
+ if (!(d->state == Connecting || d->state == Connected)) {
return false;
+ }
QEventLoop* loop = new QEventLoop(this);
QObject::connect(d, SIGNAL(quitPendingWaitsForOpened()),