summaryrefslogtreecommitdiffstats
path: root/src/network/bearer/qnetworkconfigmanager_p.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-04-14 23:22:36 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-04-15 03:13:37 (GMT)
commit86b483104fa1e8c1b2bcd255f9b94992d1d1b864 (patch)
treec1a1368a3a22e2e0cbf384f87849d18a2900e40c /src/network/bearer/qnetworkconfigmanager_p.cpp
parent3174684f5364f9c6a4acbc211d85577b3bab6449 (diff)
downloadQt-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.cpp16
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");
}
}