diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-06-10 05:59:23 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-06-24 02:27:46 (GMT) |
commit | 12c06cfb761b1c8b3575df9ad6d1aabdbd2ed402 (patch) | |
tree | df2a9ae67fa74d4be8b9eb32502ebef39cc27543 /examples/network | |
parent | 3c766b835fd565e3a85606ae2d4891e3954b447a (diff) | |
download | Qt-12c06cfb761b1c8b3575df9ad6d1aabdbd2ed402.zip Qt-12c06cfb761b1c8b3575df9ad6d1aabdbd2ed402.tar.gz Qt-12c06cfb761b1c8b3575df9ad6d1aabdbd2ed402.tar.bz2 |
Cherry pick fix for MOBILITY-1047 from Qt Mobility.
4f74cd44d77349759096bed091913b188a9167e4
Diffstat (limited to 'examples/network')
-rw-r--r-- | examples/network/bearermonitor/bearermonitor.cpp | 11 |
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()) { |