diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2009-12-03 05:00:24 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-01-04 00:54:57 (GMT) |
commit | f7eb78d6b7cc0e07275ab64bec2743c5b2c0705f (patch) | |
tree | 1d71d597fe6dd54e8b7f68e41e74e90b8ef678a9 /src/network/bearer/qnetworkconfigmanager_p.cpp | |
parent | 0bcb2788e1eb225e0e3babb4ca113bcb5769dfc2 (diff) | |
download | Qt-f7eb78d6b7cc0e07275ab64bec2743c5b2c0705f.zip Qt-f7eb78d6b7cc0e07275ab64bec2743c5b2c0705f.tar.gz Qt-f7eb78d6b7cc0e07275ab64bec2743c5b2c0705f.tar.bz2 |
Convert CoreWlan engine into a plugin.
Diffstat (limited to 'src/network/bearer/qnetworkconfigmanager_p.cpp')
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager_p.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp index c35edbf..f8e0d7b 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.cpp +++ b/src/network/bearer/qnetworkconfigmanager_p.cpp @@ -40,11 +40,6 @@ ****************************************************************************/ #include "qnetworkconfigmanager_p.h" - -#ifdef Q_OS_DARWIN -#include "qcorewlanengine_mac_p.h" -#endif - #include "qbearerplugin.h" #include <QtCore/private/qfactoryloader_p.h> @@ -229,10 +224,17 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations() QStringList keys = l->keys(); #if defined (Q_OS_DARWIN) - coreWifi = QCoreWlanEngine::instance(); - if (coreWifi) { - connect(coreWifi, SIGNAL(configurationsChanged()), - this, SLOT(updateConfigurations())); + coreWifi = 0; + if (keys.contains(QLatin1String("corewlan"))) { + QBearerEnginePlugin *coreWlanPlugin = + qobject_cast<QBearerEnginePlugin *>(l->instance(QLatin1String("corewlan"))); + if (coreWlanPlugin) { + coreWifi = coreWlanPlugin->create(QLatin1String("corewlan")); + if (coreWifi) { + connect(coreWifi, SIGNAL(configurationsChanged()), + this, SLOT(updateConfigurations())); + } + } } #else #ifdef BACKEND_NM @@ -473,7 +475,4 @@ void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate() #endif } -#include "moc_qnetworkconfigmanager_p.cpp" - QT_END_NAMESPACE - |