summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/networkmanager
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/networkmanager
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/networkmanager')
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp6
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 13b2252..3ebc356 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -93,16 +93,16 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent)
userSettings->setConnections();
connect(userSettings, SIGNAL(newConnection(QDBusObjectPath)),
this, SLOT(newConnection(QDBusObjectPath)));
-
- QMetaObject::invokeMethod(this, "init", Qt::QueuedConnection);
}
QNetworkManagerEngine::~QNetworkManagerEngine()
{
}
-void QNetworkManagerEngine::init()
+void QNetworkManagerEngine::initialize()
{
+ QMutexLocker locker(&mutex);
+
// Get current list of access points.
foreach (const QDBusObjectPath &devicePath, interface->getDevices())
deviceAdded(devicePath);
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
index 7f8badb..8e95a2c 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
@@ -73,8 +73,6 @@ public:
QNetworkManagerEngine(QObject *parent = 0);
~QNetworkManagerEngine();
- Q_INVOKABLE void init();
-
bool networkManagerAvailable() const;
QString getInterfaceFromId(const QString &id);
@@ -85,6 +83,7 @@ public:
void connectToId(const QString &id);
void disconnectFromId(const QString &id);
+ Q_INVOKABLE void initialize();
Q_INVOKABLE void requestUpdate();
QNetworkSession::State sessionStateForId(const QString &id);