summaryrefslogtreecommitdiffstats
path: root/src/plugins/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/plugins/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/plugins/bearer')
-rw-r--r--src/plugins/bearer/qnetworksession_impl.cpp19
-rw-r--r--src/plugins/bearer/qnetworksession_impl.h2
2 files changed, 10 insertions, 11 deletions
diff --git a/src/plugins/bearer/qnetworksession_impl.cpp b/src/plugins/bearer/qnetworksession_impl.cpp
index ddda04f..db1759c 100644
--- a/src/plugins/bearer/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/qnetworksession_impl.cpp
@@ -103,7 +103,7 @@ void QNetworkSessionPrivateImpl::syncStateWithInterface()
connect(sessionManager(), SIGNAL(forcedSessionClose(QNetworkConfiguration)),
this, SLOT(forcedSessionClose(QNetworkConfiguration)));
- sessionOpened = false;
+ opened = false;
isOpen = false;
state = QNetworkSession::Invalid;
lastError = QNetworkSession::UnknownSessionError;
@@ -153,7 +153,7 @@ void QNetworkSessionPrivateImpl::open()
emit QNetworkSessionPrivate::error(lastError);
return;
}
- sessionOpened = true;
+ opened = true;
if ((activeConfig.state() & QNetworkConfiguration::Active) != QNetworkConfiguration::Active &&
(activeConfig.state() & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
@@ -165,7 +165,7 @@ void QNetworkSessionPrivateImpl::open()
isOpen = (activeConfig.state() & QNetworkConfiguration::Active) == QNetworkConfiguration::Active;
if (isOpen)
- emit opened();
+ emit quitPendingWaitsForOpened();
}
}
@@ -175,7 +175,7 @@ void QNetworkSessionPrivateImpl::close()
lastError = QNetworkSession::OperationNotSupportedError;
emit QNetworkSessionPrivate::error(lastError);
} else if (isOpen) {
- sessionOpened = false;
+ opened = false;
isOpen = false;
emit closed();
}
@@ -196,7 +196,7 @@ void QNetworkSessionPrivateImpl::stop()
sessionManager()->forceSessionClose(activeConfig);
}
- sessionOpened = false;
+ opened = false;
isOpen = false;
emit closed();
}
@@ -364,10 +364,10 @@ void QNetworkSessionPrivateImpl::updateStateFromActiveConfig()
state = engine->sessionStateForId(activeConfig.identifier());
bool oldActive = isOpen;
- isOpen = (state == QNetworkSession::Connected) ? sessionOpened : false;
+ isOpen = (state == QNetworkSession::Connected) ? opened : false;
if (!oldActive && isOpen)
- emit opened();
+ emit quitPendingWaitsForOpened();
if (oldActive && !isOpen)
emit closed();
@@ -398,7 +398,7 @@ void QNetworkSessionPrivateImpl::configurationChanged(QNetworkConfigurationPriva
void QNetworkSessionPrivateImpl::forcedSessionClose(const QNetworkConfiguration &config)
{
if (activeConfig == config) {
- sessionOpened = false;
+ opened = false;
isOpen = false;
emit closed();
@@ -416,7 +416,7 @@ void QNetworkSessionPrivateImpl::connectionError(const QString &id,
switch (error) {
case QBearerEngineImpl::OperationNotSupported:
lastError = QNetworkSession::OperationNotSupportedError;
- sessionOpened = false;
+ opened = false;
break;
case QBearerEngineImpl::InterfaceLookupError:
case QBearerEngineImpl::ConnectError:
@@ -426,7 +426,6 @@ void QNetworkSessionPrivateImpl::connectionError(const QString &id,
}
emit QNetworkSessionPrivate::error(lastError);
- emit closed();
}
}
diff --git a/src/plugins/bearer/qnetworksession_impl.h b/src/plugins/bearer/qnetworksession_impl.h
index c31e540..c644174 100644
--- a/src/plugins/bearer/qnetworksession_impl.h
+++ b/src/plugins/bearer/qnetworksession_impl.h
@@ -114,7 +114,7 @@ private Q_SLOTS:
void decrementTimeout();
private:
- bool sessionOpened;
+ bool opened;
QBearerEngineImpl *engine;