diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-25 00:57:11 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-03-25 05:52:59 (GMT) |
commit | af5501d2bef7242d3949d639e2bab7e326654bb2 (patch) | |
tree | 3a8e2082cdca3b653c826d1631008206650a50b3 /src | |
parent | a573e48c107ca0446127cead281ac9e469375d04 (diff) | |
download | Qt-af5501d2bef7242d3949d639e2bab7e326654bb2.zip Qt-af5501d2bef7242d3949d639e2bab7e326654bb2.tar.gz Qt-af5501d2bef7242d3949d639e2bab7e326654bb2.tar.bz2 |
Don't emit signals in constructor.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp | 13 | ||||
-rw-r--r-- | src/plugins/bearer/networkmanager/qnetworkmanagerengine.h | 2 |
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); |