summaryrefslogtreecommitdiffstats
path: root/src/network/bearer
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-19 04:27:26 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-03-19 04:27:26 (GMT)
commit02bdd61245da529ff99cdebc939b33fefe398f48 (patch)
tree7571377e856432611f031051a08d2bbe437bf5b7 /src/network/bearer
parentf9e3b16b7e2f3ca9ecf6f05341c2a78fb561b682 (diff)
downloadQt-02bdd61245da529ff99cdebc939b33fefe398f48.zip
Qt-02bdd61245da529ff99cdebc939b33fefe398f48.tar.gz
Qt-02bdd61245da529ff99cdebc939b33fefe398f48.tar.bz2
Revert "Don't emit open signal on session close/error."
This reverts commit 39818f933b958d504b9cc18487658209d1df22da.
Diffstat (limited to 'src/network/bearer')
-rw-r--r--src/network/bearer/qnetworksession.cpp9
-rw-r--r--src/network/bearer/qnetworksession_p.h4
2 files changed, 8 insertions, 5 deletions
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index d05f20e..cf9f4b2 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -231,7 +231,7 @@ QNetworkSession::QNetworkSession(const QNetworkConfiguration& connectionConfig,
d->q = this;
d->publicConfig = connectionConfig;
d->syncStateWithInterface();
- connect(d, SIGNAL(opened()), this, SIGNAL(opened()));
+ connect(d, SIGNAL(quitPendingWaitsForOpened()), this, SIGNAL(opened()));
connect(d, SIGNAL(error(QNetworkSession::SessionError)),
this, SIGNAL(error(QNetworkSession::SessionError)));
connect(d, SIGNAL(stateChanged(QNetworkSession::State)),
@@ -308,9 +308,10 @@ bool QNetworkSession::waitForOpened(int msecs)
return false;
QEventLoop* loop = new QEventLoop(this);
- connect(d, SIGNAL(opened()), loop, SLOT(quit()));
- connect(d, SIGNAL(closed()), loop, SLOT(quit()));
- connect(d, SIGNAL(error(QNetworkSession::SessionError)), loop, SLOT(quit()));
+ QObject::connect(d, SIGNAL(quitPendingWaitsForOpened()),
+ loop, SLOT(quit()));
+ QObject::connect(this, SIGNAL(error(QNetworkSession::SessionError)),
+ loop, SLOT(quit()));
//final call
if (msecs>=0)
diff --git a/src/network/bearer/qnetworksession_p.h b/src/network/bearer/qnetworksession_p.h
index 5eef8e3..76691b3 100644
--- a/src/network/bearer/qnetworksession_p.h
+++ b/src/network/bearer/qnetworksession_p.h
@@ -116,7 +116,9 @@ protected:
}
Q_SIGNALS:
- void opened();
+ //releases any pending waitForOpened() calls
+ void quitPendingWaitsForOpened();
+
void error(QNetworkSession::SessionError error);
void stateChanged(QNetworkSession::State state);
void closed();