summaryrefslogtreecommitdiffstats
path: root/src/network/bearer/qnetworkconfigmanager_p.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2010-06-03 01:35:38 (GMT)
committerAaron McCarthy <aaron.mccarthy@nokia.com>2010-06-03 01:35:38 (GMT)
commit5f09880833fe39b49881469d19f09daaf5ef27e6 (patch)
tree8980eedc13864e71bb91e1ce49924dc2dca2eb8e /src/network/bearer/qnetworkconfigmanager_p.cpp
parent8e7eb9d692acc62949abccb4ac218d084201c099 (diff)
downloadQt-5f09880833fe39b49881469d19f09daaf5ef27e6.zip
Qt-5f09880833fe39b49881469d19f09daaf5ef27e6.tar.gz
Qt-5f09880833fe39b49881469d19f09daaf5ef27e6.tar.bz2
Don't poll non-polling engines when configurations are in use.
Diffstat (limited to 'src/network/bearer/qnetworkconfigmanager_p.cpp')
-rw-r--r--src/network/bearer/qnetworkconfigmanager_p.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/bearer/qnetworkconfigmanager_p.cpp b/src/network/bearer/qnetworkconfigmanager_p.cpp
index 471927a..5d4274f 100644
--- a/src/network/bearer/qnetworkconfigmanager_p.cpp
+++ b/src/network/bearer/qnetworkconfigmanager_p.cpp
@@ -483,8 +483,10 @@ void QNetworkConfigurationManagerPrivate::pollEngines()
QMutexLocker locker(&mutex);
for (int i = 0; i < sessionEngines.count(); ++i) {
- if ((forcedPolling && sessionEngines.at(i)->requiresPolling()) ||
- sessionEngines.at(i)->configurationsInUse()) {
+ if (!sessionEngines.at(i)->requiresPolling())
+ continue;
+
+ if (forcedPolling || sessionEngines.at(i)->configurationsInUse()) {
pollingEngines.insert(i);
QMetaObject::invokeMethod(sessionEngines.at(i), "requestUpdate");
}