summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-06-10 05:59:23 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-06-24 02:27:46 (GMT)
commit12c06cfb761b1c8b3575df9ad6d1aabdbd2ed402 (patch)
treedf2a9ae67fa74d4be8b9eb32502ebef39cc27543
parent3c766b835fd565e3a85606ae2d4891e3954b447a (diff)
downloadQt-12c06cfb761b1c8b3575df9ad6d1aabdbd2ed402.zip
Qt-12c06cfb761b1c8b3575df9ad6d1aabdbd2ed402.tar.gz
Qt-12c06cfb761b1c8b3575df9ad6d1aabdbd2ed402.tar.bz2
Cherry pick fix for MOBILITY-1047 from Qt Mobility.
4f74cd44d77349759096bed091913b188a9167e4
-rw-r--r--examples/network/bearermonitor/bearermonitor.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp
index 4a04b4c..98869ea 100644
--- a/examples/network/bearermonitor/bearermonitor.cpp
+++ b/examples/network/bearermonitor/bearermonitor.cpp
@@ -80,7 +80,7 @@ BearerMonitor::BearerMonitor(QWidget *parent)
break;
}
}
-
+ connect(&manager, SIGNAL(onlineStateChanged(bool)), this ,SLOT(onlineStateChanged(bool)));
connect(&manager, SIGNAL(configurationAdded(const QNetworkConfiguration&)),
this, SLOT(configurationAdded(const QNetworkConfiguration&)));
connect(&manager, SIGNAL(configurationRemoved(const QNetworkConfiguration&)),
@@ -88,7 +88,6 @@ BearerMonitor::BearerMonitor(QWidget *parent)
connect(&manager, SIGNAL(configurationChanged(const QNetworkConfiguration&)),
this, SLOT(configurationChanged(const QNetworkConfiguration)));
connect(&manager, SIGNAL(updateCompleted()), this, SLOT(updateConfigurations()));
- connect(&manager, SIGNAL(onlineStateChanged(bool)), this ,SLOT(onlineStateChanged(bool)));
#ifdef Q_OS_WIN
connect(registerButton, SIGNAL(clicked()), this, SLOT(registerNetwork()));
@@ -111,6 +110,10 @@ BearerMonitor::BearerMonitor(QWidget *parent)
#endif
connect(scanButton, SIGNAL(clicked()),
this, SLOT(performScan()));
+
+ // Just in case update all configurations so that all
+ // configurations are up to date.
+ manager.updateConfigurations();
}
BearerMonitor::~BearerMonitor()
@@ -209,6 +212,10 @@ void BearerMonitor::updateConfigurations()
progressBar->hide();
scanButton->show();
+ // Just in case update online state, on Symbian platform
+ // WLAN scan needs to be triggered initially to have their true state.
+ onlineStateChanged(manager.isOnline());
+
QList<QTreeWidgetItem *> items = treeWidget->findItems(QLatin1String("*"), Qt::MatchWildcard);
QMap<QString, QTreeWidgetItem *> itemMap;
while (!items.isEmpty()) {