diff options
author | lsgunda <leena.gunda@wipro.com> | 2010-09-29 12:21:47 +1000 |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-09-29 13:08:07 +1000 |
commit | 926979b6816c630adf83f7ac0d0f6276bb26efb3 (patch) | |
tree | 6939eed5ae3dbd87e9e7835feec944ab0732587d /examples | |
parent | 6fdfbffc9d37338dab8a0062d8e8b99ba3322b49 (diff) | |
download | qt4-tools-926979b6816c630adf83f7ac0d0f6276bb26efb3.tar.gz |
Fix for bug QTMOBILITY-448 to list the default network configuration in Bearermonitor example
Merge-request: 827
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/network/bearermonitor/bearermonitor.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp index 1959919a98..2c976ffc37 100644 --- a/examples/network/bearermonitor/bearermonitor.cpp +++ b/examples/network/bearermonitor/bearermonitor.cpp @@ -220,11 +220,26 @@ void BearerMonitor::updateConfigurations() itemMap.insert(item->data(0, Qt::UserRole).toString(), item); } + QNetworkConfiguration defaultConfiguration = manager.defaultConfiguration(); + QTreeWidgetItem *defaultItem = itemMap.take(defaultConfiguration.identifier()); + + if (defaultItem) { + updateItem(defaultItem, defaultConfiguration); + + if (defaultConfiguration.type() == QNetworkConfiguration::ServiceNetwork) + updateSnapConfiguration(defaultItem, defaultConfiguration); + } else { + configurationAdded(defaultConfiguration); + } + QList<QNetworkConfiguration> allConfigurations = manager.allConfigurations(); while (!allConfigurations.isEmpty()) { QNetworkConfiguration config = allConfigurations.takeFirst(); + if (config.identifier() == defaultConfiguration.identifier()) + continue; + QTreeWidgetItem *item = itemMap.take(config.identifier()); if (item) { updateItem(item, config); |