diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-04-14 23:22:36 (GMT) |
---|---|---|
committer | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2010-04-15 03:13:37 (GMT) |
commit | 86b483104fa1e8c1b2bcd255f9b94992d1d1b864 (patch) | |
tree | c1a1368a3a22e2e0cbf384f87849d18a2900e40c /src/network/bearer/qnetworkconfigmanager_p.cpp | |
parent | 3174684f5364f9c6a4acbc211d85577b3bab6449 (diff) | |
download | Qt-86b483104fa1e8c1b2bcd255f9b94992d1d1b864.zip Qt-86b483104fa1e8c1b2bcd255f9b94992d1d1b864.tar.gz Qt-86b483104fa1e8c1b2bcd255f9b94992d1d1b864.tar.bz2 |
Remove holes in bearer management data structures.
Diffstat (limited to 'src/network/bearer/qnetworkconfigmanager_p.cpp')
-rw-r--r-- | src/network/bearer/qnetworkconfigmanager_p.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp index c665fa2..b4d4c6b 100644 --- a/src/network/bearer/qnetworkconfigmanager_p.cpp +++ b/src/network/bearer/qnetworkconfigmanager_p.cpp @@ -56,7 +56,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader, (QBearerEngineFactoryInterface_iid, QLatin1String("/bearer"))) QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate() -: capFlags(0), mutex(QMutex::Recursive), pollTimer(0), forcedPolling(0), firstUpdate(true) +: pollTimer(0), mutex(QMutex::Recursive), forcedPolling(0), firstUpdate(true) { qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration"); @@ -265,6 +265,18 @@ bool QNetworkConfigurationManagerPrivate::isOnline() return !onlineConfigurations.isEmpty(); } +QNetworkConfigurationManager::Capabilities QNetworkConfigurationManagerPrivate::capabilities() +{ + QMutexLocker locker(&mutex); + + QNetworkConfigurationManager::Capabilities capFlags; + + foreach (QBearerEngine *engine, sessionEngines) + capFlags |= engine->capabilities(); + + return capFlags; +} + void QNetworkConfigurationManagerPrivate::configurationAdded(QNetworkConfigurationPrivatePointer ptr) { QMutexLocker locker(&mutex); @@ -367,8 +379,6 @@ void QNetworkConfigurationManagerPrivate::updateConfigurations() connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)), this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer))); - capFlags |= engine->capabilities(); - QMetaObject::invokeMethod(engine, "requestUpdate"); } } |