summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/bearer')
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp13
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.h2
2 files changed, 11 insertions, 4 deletions
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index d7e315a..2b2df07 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -91,6 +91,15 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent)
connect(userSettings, SIGNAL(newConnection(QDBusObjectPath)),
this, SLOT(newConnection(QDBusObjectPath)));
+ QMetaObject::invokeMethod(this, "init", Qt::QueuedConnection);
+}
+
+QNetworkManagerEngine::~QNetworkManagerEngine()
+{
+}
+
+void QNetworkManagerEngine::init()
+{
// Get current list of access points.
foreach (const QDBusObjectPath &devicePath, interface->getDevices())
deviceAdded(devicePath);
@@ -113,10 +122,6 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent)
}
}
-QNetworkManagerEngine::~QNetworkManagerEngine()
-{
-}
-
bool QNetworkManagerEngine::networkManagerAvailable() const
{
QMutexLocker locker(&mutex);
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
index 05a1429..af3f450 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
@@ -70,6 +70,8 @@ public:
QNetworkManagerEngine(QObject *parent = 0);
~QNetworkManagerEngine();
+ Q_INVOKABLE void init();
+
bool networkManagerAvailable() const;
QString getInterfaceFromId(const QString &id);