summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/icd/qicdengine.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-04-20 05:35:29 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-04-20 07:02:46 (GMT)
commitc4c75ebd65454fd27bffefb4a3468ece20990c86 (patch)
tree3cf53f960be45c31005371a602fe297671c994a5 /src/plugins/bearer/icd/qicdengine.cpp
parentb64a309f78b684bf3acb49bc6d0e9b93aa2138c5 (diff)
downloadQt-c4c75ebd65454fd27bffefb4a3468ece20990c86.zip
Qt-c4c75ebd65454fd27bffefb4a3468ece20990c86.tar.gz
Qt-c4c75ebd65454fd27bffefb4a3468ece20990c86.tar.bz2
Remove redundant network configuration updates on startup.
The initial list of network configurations was being fetched twice when the bearer management plugins are loaded.
Diffstat (limited to 'src/plugins/bearer/icd/qicdengine.cpp')
-rw-r--r--src/plugins/bearer/icd/qicdengine.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp
index fc9b469..9d1bfab 100644
--- a/src/plugins/bearer/icd/qicdengine.cpp
+++ b/src/plugins/bearer/icd/qicdengine.cpp
@@ -225,8 +225,6 @@ QIcdEngine::QIcdEngine(QObject *parent)
: QBearerEngine(parent), iapMonitor(new IapMonitor), m_dbusInterface(0),
firstUpdate(true), m_scanGoingOn(false)
{
- QMetaObject::invokeMethod(this, "doRequestUpdate", Qt::QueuedConnection);
- init();
}
QIcdEngine::~QIcdEngine()
@@ -243,8 +241,10 @@ QNetworkConfigurationManager::Capabilities QIcdEngine::capabilities() const
QNetworkConfigurationManager::NetworkSessionRequired;
}
-void QIcdEngine::init()
+void QIcdEngine::initialize()
{
+ QMutexLocker locker(&mutex);
+
// Setup DBus Interface for ICD
m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE,
ICD_DBUS_API_PATH,
@@ -272,6 +272,8 @@ void QIcdEngine::init()
QNetworkConfigurationPrivatePointer ptr(cpPriv);
userChoiceConfigurations.insert(cpPriv->id, ptr);
+
+ doRequestUpdate();
}
static inline QString network_attrs_to_security(uint network_attrs)