summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/icd
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
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')
-rw-r--r--src/plugins/bearer/icd/qicdengine.cpp8
-rw-r--r--src/plugins/bearer/icd/qicdengine.h2
2 files changed, 6 insertions, 4 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)
diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h
index 841874f..2f9f8ed 100644
--- a/src/plugins/bearer/icd/qicdengine.h
+++ b/src/plugins/bearer/icd/qicdengine.h
@@ -91,6 +91,7 @@ public:
bool hasIdentifier(const QString &id);
+ Q_INVOKABLE void initialize();
Q_INVOKABLE void requestUpdate();
QNetworkConfigurationManager::Capabilities capabilities() const;
@@ -123,7 +124,6 @@ public:
emit configurationChanged(ptr);
}
- void init();
void cleanup();
void addConfiguration(QString &iap_id);