summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/networkmanager
diff options
context:
space:
mode:
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);