qnetworkconfigmanager_p.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/bearer/qnetworkconfigmanager_p.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtNetwork module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qnetworkconfigmanager_p.h"-
41#include "qbearerplugin_p.h"-
42-
43#include <QtCore/private/qfactoryloader_p.h>-
44-
45#include <QtCore/qdebug.h>-
46#include <QtCore/qtimer.h>-
47#include <QtCore/qstringlist.h>-
48#include <QtCore/qthread.h>-
49#include <QtCore/private/qcoreapplication_p.h>-
50#include <QtCore/private/qthread_p.h>-
51-
52#include <QtCore/qbytearray.h>-
53#include <QtCore/qglobal.h>-
54-
55#include <utility>-
56-
57-
58#ifndef QT_NO_BEARERMANAGEMENT-
59-
60QT_BEGIN_NAMESPACE-
61-
62QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate()-
63 : QObject(), pollTimer(0), mutex(QMutex::Recursive), forcedPolling(0), firstUpdate(true)-
64{-
65 qRegisterMetaType<QNetworkConfiguration>();-
66 qRegisterMetaType<QNetworkConfigurationPrivatePointer>();-
67}
executed 18 times by 16 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
68-
69void QNetworkConfigurationManagerPrivate::initialize()-
70{-
71 //Two stage construction, because we only want to do this heavyweight work for the winner of the Q_GLOBAL_STATIC race.-
72 bearerThread = new QDaemonThread();-
73 bearerThread->setObjectName(QStringLiteral("Qt bearer thread"));
executed 18 times by 16 tests: return qstring_literal_temp;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
74-
75 bearerThread->moveToThread(QCoreApplicationPrivate::mainThread()); // because cleanup() is called in main thread context.-
76 moveToThread(bearerThread);-
77 bearerThread->start();-
78 updateConfigurations();-
79}
executed 18 times by 16 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
80-
81QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate()-
82{-
83 QMutexLocker locker(&mutex);-
84-
85 qDeleteAll(sessionEngines);-
86 sessionEngines.clear();-
87 if (bearerThread)
bearerThreadDescription
TRUEevaluated 20 times by 19 tests
Evaluated by:
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfiguration - unknown status
  • tst_qnetworkconfigurationmanager - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qnetworksession - unknown status
  • tst_qtcpserver - unknown status
  • tst_qudpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
FALSEnever evaluated
0-20
88 bearerThread->quit();
executed 20 times by 19 tests: bearerThread->quit();
Executed by:
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfiguration - unknown status
  • tst_qnetworkconfigurationmanager - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qnetworksession - unknown status
  • tst_qtcpserver - unknown status
  • tst_qudpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
20
89}
executed 20 times by 19 tests: end of block
Executed by:
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfiguration - unknown status
  • tst_qnetworkconfigurationmanager - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qnetworksession - unknown status
  • tst_qtcpserver - unknown status
  • tst_qudpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
20
90-
91void QNetworkConfigurationManagerPrivate::cleanup()-
92{-
93 QThread* thread = bearerThread;-
94 deleteLater();-
95 if (thread->wait(5000))
thread->wait(5000)Description
TRUEevaluated 20 times by 19 tests
Evaluated by:
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfiguration - unknown status
  • tst_qnetworkconfigurationmanager - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qnetworksession - unknown status
  • tst_qtcpserver - unknown status
  • tst_qudpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
FALSEnever evaluated
0-20
96 delete thread;
executed 20 times by 19 tests: delete thread;
Executed by:
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfiguration - unknown status
  • tst_qnetworkconfigurationmanager - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qnetworksession - unknown status
  • tst_qtcpserver - unknown status
  • tst_qudpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
20
97}
executed 20 times by 19 tests: end of block
Executed by:
  • tst_QNetworkConfigurationManager
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qftp - unknown status
  • tst_qhostinfo - unknown status
  • tst_qhttpnetworkconnection - unknown status
  • tst_qnetworkaccessmanager - unknown status
  • tst_qnetworkaccessmanager_and_qprogressdialog - unknown status
  • tst_qnetworkconfiguration - unknown status
  • tst_qnetworkconfigurationmanager - unknown status
  • tst_qnetworkdiskcache - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworkproxyfactory - unknown status
  • tst_qnetworksession - unknown status
  • tst_qtcpserver - unknown status
  • tst_qudpsocket - unknown status
  • tst_qxmlinputsource - unknown status
  • tst_qxmlstream - unknown status
  • tst_spdy - unknown status
20
98-
99QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration() const-
100{-
101 QMutexLocker locker(&mutex);-
102-
103 for (QBearerEngine *engine : sessionEngines) {-
104 QNetworkConfigurationPrivatePointer ptr = engine->defaultConfiguration();-
105 if (ptr) {
ptrDescription
TRUEevaluated 301 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
FALSEnever evaluated
0-301
106 QNetworkConfiguration config;-
107 config.d = ptr;-
108 return config;
executed 301 times by 18 tests: return config;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
301
109 }-
110 }
never executed: end of block
0
111-
112 // Engines don't have a default configuration.-
113-
114 // Return first active snap-
115 QNetworkConfigurationPrivatePointer defaultConfiguration;-
116-
117 for (QBearerEngine *engine : sessionEngines) {-
118 QMutexLocker locker(&engine->mutex);-
119-
120 for (const auto &ptr : qAsConst(engine->snapConfigurations)) {-
121 QMutexLocker configLocker(&ptr->mutex);-
122-
123 if ((ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
(ptr->state & ...ration::ActiveDescription
TRUEnever evaluated
FALSEnever evaluated
0
124 QNetworkConfiguration config;-
125 config.d = ptr;-
126 return config;
never executed: return config;
0
127 } else if (!defaultConfiguration) {
!defaultConfigurationDescription
TRUEnever evaluated
FALSEnever evaluated
0
128 if ((ptr->state & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered)
(ptr->state & ...on::DiscoveredDescription
TRUEnever evaluated
FALSEnever evaluated
0
129 defaultConfiguration = ptr;
never executed: defaultConfiguration = ptr;
0
130 }
never executed: end of block
0
131 }
never executed: end of block
0
132 }
never executed: end of block
0
133-
134 // No Active SNAPs return first Discovered SNAP.-
135 if (defaultConfiguration) {
defaultConfigurationDescription
TRUEnever evaluated
FALSEnever evaluated
0
136 QNetworkConfiguration config;-
137 config.d = defaultConfiguration;-
138 return config;
never executed: return config;
0
139 }-
140-
141 /*-
142 No Active or Discovered SNAPs, find the perferred access point.-
143 The following priority order is used:-
144-
145 1. Active Ethernet-
146 2. Active WLAN-
147 3. Active Other-
148 4. Discovered Ethernet-
149 5. Discovered WLAN-
150 6. Discovered Other-
151 */-
152-
153 for (QBearerEngine *engine : sessionEngines) {-
154-
155 QMutexLocker locker(&engine->mutex);-
156-
157 for (const auto &ptr : qAsConst(engine->accessPointConfigurations)) {-
158-
159 QMutexLocker configLocker(&ptr->mutex);-
160 QNetworkConfiguration::BearerType bearerType = ptr->bearerType;-
161-
162 if ((ptr->state & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered) {
(ptr->state & ...on::DiscoveredDescription
TRUEnever evaluated
FALSEnever evaluated
0
163 if (!defaultConfiguration) {
!defaultConfigurationDescription
TRUEnever evaluated
FALSEnever evaluated
0
164 defaultConfiguration = ptr;-
165 } else {
never executed: end of block
0
166 QMutexLocker defaultConfigLocker(&defaultConfiguration->mutex);-
167-
168 if (defaultConfiguration->state == ptr->state) {
defaultConfigu... == ptr->stateDescription
TRUEnever evaluated
FALSEnever evaluated
0
169 switch (defaultConfiguration->bearerType) {-
170 case QNetworkConfiguration::BearerEthernet:
never executed: case QNetworkConfiguration::BearerEthernet:
0
171 // do nothing-
172 break;
never executed: break;
0
173 case QNetworkConfiguration::BearerWLAN:
never executed: case QNetworkConfiguration::BearerWLAN:
0
174 // Ethernet beats WLAN-
175 defaultConfiguration = ptr;-
176 break;
never executed: break;
0
177 default:
never executed: default:
0
178 // Ethernet and WLAN beats other-
179 if (bearerType == QNetworkConfiguration::BearerEthernet ||
bearerType == ...BearerEthernetDescription
TRUEnever evaluated
FALSEnever evaluated
0
180 bearerType == QNetworkConfiguration::BearerWLAN) {
bearerType == ...on::BearerWLANDescription
TRUEnever evaluated
FALSEnever evaluated
0
181 defaultConfiguration = ptr;-
182 }
never executed: end of block
0
183 }
never executed: end of block
0
184 } else {-
185 // active beats discovered-
186 if ((defaultConfiguration->state & QNetworkConfiguration::Active) !=
(defaultConfig...ration::ActiveDescription
TRUEnever evaluated
FALSEnever evaluated
0
187 QNetworkConfiguration::Active) {
(defaultConfig...ration::ActiveDescription
TRUEnever evaluated
FALSEnever evaluated
0
188 defaultConfiguration = ptr;-
189 }
never executed: end of block
0
190 }
never executed: end of block
0
191 }-
192 }-
193 }
never executed: end of block
0
194 }
never executed: end of block
0
195-
196 // No Active InternetAccessPoint return first Discovered InternetAccessPoint.-
197 if (defaultConfiguration) {
defaultConfigurationDescription
TRUEnever evaluated
FALSEnever evaluated
0
198 QNetworkConfiguration config;-
199 config.d = defaultConfiguration;-
200 return config;
never executed: return config;
0
201 }-
202-
203 return QNetworkConfiguration();
never executed: return QNetworkConfiguration();
0
204}-
205-
206QList<QNetworkConfiguration> QNetworkConfigurationManagerPrivate::allConfigurations(QNetworkConfiguration::StateFlags filter) const-
207{-
208 QList<QNetworkConfiguration> result;-
209-
210 QMutexLocker locker(&mutex);-
211-
212 for (QBearerEngine *engine : sessionEngines) {-
213-
214 QMutexLocker locker(&engine->mutex);-
215-
216 //find all InternetAccessPoints-
217 for (const auto &ptr : qAsConst(engine->accessPointConfigurations)) {-
218 QMutexLocker configLocker(&ptr->mutex);-
219-
220 if ((ptr->state & filter) == filter) {
(ptr->state & ...ter) == filterDescription
TRUEevaluated 81 times by 4 tests
Evaluated by:
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QNetworkConfigurationManager
3-81
221 QNetworkConfiguration pt;-
222 pt.d = ptr;-
223 result << pt;-
224 }
executed 81 times by 4 tests: end of block
Executed by:
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
81
225 }
executed 84 times by 4 tests: end of block
Executed by:
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
84
226-
227 //find all service networks-
228 for (const auto &ptr : qAsConst(engine->snapConfigurations)) {-
229 QMutexLocker configLocker(&ptr->mutex);-
230-
231 if ((ptr->state & filter) == filter) {
(ptr->state & ...ter) == filterDescription
TRUEnever evaluated
FALSEnever evaluated
0
232 QNetworkConfiguration pt;-
233 pt.d = ptr;-
234 result << pt;-
235 }
never executed: end of block
0
236 }
never executed: end of block
0
237 }
executed 56 times by 4 tests: end of block
Executed by:
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
56
238-
239 return result;
executed 28 times by 4 tests: return result;
Executed by:
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
28
240}-
241-
242QNetworkConfiguration QNetworkConfigurationManagerPrivate::configurationFromIdentifier(const QString &identifier) const-
243{-
244 QNetworkConfiguration item;-
245-
246 QMutexLocker locker(&mutex);-
247-
248 for (QBearerEngine *engine : sessionEngines) {-
249 QMutexLocker locker(&engine->mutex);-
250 if (auto ptr = engine->accessPointConfigurations.value(identifier)) {
auto ptr = eng...ue(identifier)Description
TRUEevaluated 119 times by 3 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkConfigurationManager
  • tst_QNetworkReply
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkConfigurationManager
4-119
251 item.d = std::move(ptr);-
252 break;
executed 119 times by 3 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkConfigurationManager
  • tst_QNetworkReply
119
253 }-
254 if (auto ptr = engine->snapConfigurations.value(identifier)) {
auto ptr = eng...ue(identifier)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkConfigurationManager
0-4
255 item.d = std::move(ptr);-
256 break;
never executed: break;
0
257 }-
258 if (auto ptr = engine->userChoiceConfigurations.value(identifier)) {
auto ptr = eng...ue(identifier)Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_QNetworkConfigurationManager
0-4
259 item.d = std::move(ptr);-
260 break;
never executed: break;
0
261 }-
262 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QNetworkConfigurationManager
4
263-
264 return item;
executed 120 times by 3 tests: return item;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QNetworkConfigurationManager
  • tst_QNetworkReply
120
265}-
266-
267bool QNetworkConfigurationManagerPrivate::isOnline() const-
268{-
269 QMutexLocker locker(&mutex);-
270-
271 // We need allConfigurations since onlineConfigurations is filled with queued connections-
272 // and thus is not always (more importantly just after creation) up to date-
273 return !allConfigurations(QNetworkConfiguration::Active).isEmpty();
executed 1 time by 1 test: return !allConfigurations(QNetworkConfiguration::Active).isEmpty();
Executed by:
  • tst_QNetworkConfigurationManager
1
274}-
275-
276QNetworkConfigurationManager::Capabilities QNetworkConfigurationManagerPrivate::capabilities() const-
277{-
278 QMutexLocker locker(&mutex);-
279-
280 QNetworkConfigurationManager::Capabilities capFlags;-
281-
282 for (QBearerEngine *engine : sessionEngines)-
283 capFlags |= engine->capabilities();
executed 188 times by 12 tests: capFlags |= engine->capabilities();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QXmlInputSource
  • tst_QXmlStream
188
284-
285 return capFlags;
executed 94 times by 12 tests: return capFlags;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QXmlInputSource
  • tst_QXmlStream
94
286}-
287-
288void QNetworkConfigurationManagerPrivate::configurationAdded(QNetworkConfigurationPrivatePointer ptr)-
289{-
290 QMutexLocker locker(&mutex);-
291-
292 if (!firstUpdate) {
!firstUpdateDescription
TRUEevaluated 56 times by 17 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEnever evaluated
0-56
293 QNetworkConfiguration item;-
294 item.d = ptr;-
295 emit configurationAdded(item);-
296 }
executed 56 times by 17 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
56
297-
298 ptr->mutex.lock();-
299 if (ptr->state == QNetworkConfiguration::Active) {
ptr->state == ...ration::ActiveDescription
TRUEevaluated 56 times by 17 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEnever evaluated
0-56
300 ptr->mutex.unlock();-
301 onlineConfigurations.insert(ptr->id);-
302 if (!firstUpdate && onlineConfigurations.count() == 1)
!firstUpdateDescription
TRUEevaluated 56 times by 17 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEnever evaluated
onlineConfigur...s.count() == 1Description
TRUEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 38 times by 17 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
0-56
303 emit onlineStateChanged(true);
executed 18 times by 16 tests: onlineStateChanged(true);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
304 } else {
executed 56 times by 17 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
56
305 ptr->mutex.unlock();-
306 }
never executed: end of block
0
307}-
308-
309void QNetworkConfigurationManagerPrivate::configurationRemoved(QNetworkConfigurationPrivatePointer ptr)-
310{-
311 QMutexLocker locker(&mutex);-
312-
313 ptr->mutex.lock();-
314 ptr->isValid = false;-
315 ptr->mutex.unlock();-
316-
317 if (!firstUpdate) {
!firstUpdateDescription
TRUEnever evaluated
FALSEnever evaluated
0
318 QNetworkConfiguration item;-
319 item.d = ptr;-
320 emit configurationRemoved(item);-
321 }
never executed: end of block
0
322-
323 onlineConfigurations.remove(ptr->id);-
324 if (!firstUpdate && onlineConfigurations.isEmpty())
!firstUpdateDescription
TRUEnever evaluated
FALSEnever evaluated
onlineConfigurations.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
0
325 emit onlineStateChanged(false);
never executed: onlineStateChanged(false);
0
326}
never executed: end of block
0
327-
328void QNetworkConfigurationManagerPrivate::configurationChanged(QNetworkConfigurationPrivatePointer ptr)-
329{-
330 QMutexLocker locker(&mutex);-
331-
332 if (!firstUpdate) {
!firstUpdateDescription
TRUEnever evaluated
FALSEnever evaluated
0
333 QNetworkConfiguration item;-
334 item.d = ptr;-
335 emit configurationChanged(item);-
336 }
never executed: end of block
0
337-
338 bool previous = !onlineConfigurations.isEmpty();-
339-
340 ptr->mutex.lock();-
341 if (ptr->state == QNetworkConfiguration::Active)
ptr->state == ...ration::ActiveDescription
TRUEnever evaluated
FALSEnever evaluated
0
342 onlineConfigurations.insert(ptr->id);
never executed: onlineConfigurations.insert(ptr->id);
0
343 else-
344 onlineConfigurations.remove(ptr->id);
never executed: onlineConfigurations.remove(ptr->id);
0
345 ptr->mutex.unlock();-
346-
347 bool online = !onlineConfigurations.isEmpty();-
348-
349 if (!firstUpdate && online != previous)
!firstUpdateDescription
TRUEnever evaluated
FALSEnever evaluated
online != previousDescription
TRUEnever evaluated
FALSEnever evaluated
0
350 emit onlineStateChanged(online);
never executed: onlineStateChanged(online);
0
351}
never executed: end of block
0
352-
353void QNetworkConfigurationManagerPrivate::updateConfigurations()-
354{-
355 typedef QMultiMap<int, QString> PluginKeyMap;-
356 typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator;-
357 QMutexLocker locker(&mutex);-
358-
359 if (firstUpdate) {
firstUpdateDescription
TRUEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 274 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18-274
360 if (qobject_cast<QBearerEngine *>(sender()))
qobject_cast<Q...e *>(sender())Description
TRUEnever evaluated
FALSEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
0-18
361 return;
never executed: return;
0
362-
363 updating = false;-
364-
365 bool envOK = false;-
366 const int skipGeneric = qEnvironmentVariableIntValue("QT_EXCLUDE_GENERIC_BEARER", &envOK);-
367 QBearerEngine *generic = 0;-
368 static QFactoryLoader loader(QBearerEngineFactoryInterface_iid, QLatin1String("/bearer"));-
369 QFactoryLoader *l = &loader;-
370 const PluginKeyMap keyMap = l->keyMap();-
371 const PluginKeyMapConstIterator cend = keyMap.constEnd();-
372 QStringList addedEngines;-
373 for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend; ++it) {
it != cendDescription
TRUEevaluated 54 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18-54
374 const QString &key = it.value();-
375 if (addedEngines.contains(key))
addedEngines.contains(key)Description
TRUEnever evaluated
FALSEevaluated 54 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
0-54
376 continue;
never executed: continue;
0
377-
378 addedEngines.append(key);-
379 if (QBearerEngine *engine = qLoadPlugin<QBearerEngine, QBearerEnginePlugin>(l, key)) {
QBearerEngine ...lugin>(l, key)Description
TRUEevaluated 36 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18-36
380 if (key == QLatin1String("generic"))
key == QLatin1...ing("generic")Description
TRUEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
381 generic = engine;
executed 18 times by 16 tests: generic = engine;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
382 else-
383 sessionEngines.append(engine);
executed 18 times by 16 tests: sessionEngines.append(engine);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
384-
385 engine->moveToThread(bearerThread);-
386-
387 connect(engine, SIGNAL(updateCompleted()),-
388 this, SLOT(updateConfigurations()),-
389 Qt::QueuedConnection);-
390 connect(engine, SIGNAL(configurationAdded(QNetworkConfigurationPrivatePointer)),-
391 this, SLOT(configurationAdded(QNetworkConfigurationPrivatePointer)),-
392 Qt::QueuedConnection);-
393 connect(engine, SIGNAL(configurationRemoved(QNetworkConfigurationPrivatePointer)),-
394 this, SLOT(configurationRemoved(QNetworkConfigurationPrivatePointer)),-
395 Qt::QueuedConnection);-
396 connect(engine, SIGNAL(configurationChanged(QNetworkConfigurationPrivatePointer)),-
397 this, SLOT(configurationChanged(QNetworkConfigurationPrivatePointer)),-
398 Qt::QueuedConnection);-
399 }
executed 36 times by 16 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
36
400 }
executed 54 times by 16 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
54
401-
402 if (generic) {
genericDescription
TRUEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEnever evaluated
0-18
403 if (!envOK || skipGeneric <= 0)
!envOKDescription
TRUEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEnever evaluated
skipGeneric <= 0Description
TRUEnever evaluated
FALSEnever evaluated
0-18
404 sessionEngines.append(generic);
executed 18 times by 16 tests: sessionEngines.append(generic);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
405 else-
406 delete generic;
never executed: delete generic;
0
407 }-
408 }
executed 18 times by 16 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
409-
410 QBearerEngine *engine = qobject_cast<QBearerEngine *>(sender());-
411 if (engine && !updatingEngines.isEmpty())
engineDescription
TRUEevaluated 274 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
!updatingEngines.isEmpty()Description
TRUEevaluated 168 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 106 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18-274
412 updatingEngines.remove(engine);
executed 168 times by 18 tests: updatingEngines.remove(engine);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
168
413-
414 if (updating && updatingEngines.isEmpty()) {
updatingDescription
TRUEevaluated 168 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 124 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
updatingEngines.isEmpty()Description
TRUEevaluated 82 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 86 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
82-168
415 updating = false;-
416 emit configurationUpdateComplete();-
417 }
executed 82 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
82
418-
419 if (engine && !pollingEngines.isEmpty()) {
engineDescription
TRUEevaluated 274 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
!pollingEngines.isEmpty()Description
TRUEevaluated 51 times by 4 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
FALSEevaluated 223 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18-274
420 pollingEngines.remove(engine);-
421 if (pollingEngines.isEmpty())
pollingEngines.isEmpty()Description
TRUEevaluated 51 times by 4 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
FALSEnever evaluated
0-51
422 startPolling();
executed 51 times by 4 tests: startPolling();
Executed by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
51
423 }
executed 51 times by 4 tests: end of block
Executed by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
51
424-
425 if (firstUpdate) {
firstUpdateDescription
TRUEevaluated 18 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 274 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18-274
426 firstUpdate = false;-
427 const QList<QBearerEngine*> enginesToInitialize = sessionEngines; //shallow copy the list in case it is modified when we unlock mutex-
428 locker.unlock();-
429 for (QBearerEngine* engine : enginesToInitialize)-
430 QMetaObject::invokeMethod(engine, "initialize", Qt::BlockingQueuedConnection);
executed 36 times by 16 tests: QMetaObject::invokeMethod(engine, "initialize", Qt::BlockingQueuedConnection);
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
36
431 }
executed 18 times by 16 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
18
432}
executed 292 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
292
433-
434void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate()-
435{-
436 QMutexLocker locker(&mutex);-
437-
438 if (sessionEngines.isEmpty()) {
sessionEngines.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 86 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
0-86
439 emit configurationUpdateComplete();-
440 return;
never executed: return;
0
441 }-
442-
443 updating = true;-
444-
445 for (QBearerEngine *engine : qAsConst(sessionEngines)) {-
446 updatingEngines.insert(engine);-
447 QMetaObject::invokeMethod(engine, "requestUpdate");-
448 }
executed 172 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
172
449}
executed 86 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
86
450-
451QList<QBearerEngine *> QNetworkConfigurationManagerPrivate::engines() const-
452{-
453 QMutexLocker locker(&mutex);-
454-
455 return sessionEngines;
executed 156 times by 15 tests: return sessionEngines;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_Spdy
156
456}-
457-
458void QNetworkConfigurationManagerPrivate::startPolling()-
459{-
460 QMutexLocker locker(&mutex);-
461 if (!pollTimer) {
!pollTimerDescription
TRUEevaluated 19 times by 17 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 64 times by 10 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
19-64
462 pollTimer = new QTimer(this);-
463 bool ok;-
464 int interval = qEnvironmentVariableIntValue("QT_BEARER_POLL_TIMEOUT", &ok);-
465 if (!ok)
!okDescription
TRUEevaluated 19 times by 17 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEnever evaluated
0-19
466 interval = 10000;//default 10 seconds
executed 19 times by 17 tests: interval = 10000;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
19
467 pollTimer->setInterval(interval);-
468 pollTimer->setSingleShot(true);-
469 connect(pollTimer, SIGNAL(timeout()), this, SLOT(pollEngines()));-
470 }
executed 19 times by 17 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
19
471-
472 if (pollTimer->isActive())
pollTimer->isActive()Description
TRUEevaluated 13 times by 6 tests
Evaluated by:
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
FALSEevaluated 70 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
13-70
473 return;
executed 13 times by 6 tests: return;
Executed by:
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
13
474-
475 for (QBearerEngine *engine : qAsConst(sessionEngines)) {-
476 if (engine->requiresPolling() && (forcedPolling || engine->configurationsInUse())) {
engine->requiresPolling()Description
TRUEevaluated 70 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 70 times by 18 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
forcedPollingDescription
TRUEevaluated 66 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
engine->configurationsInUse()Description
TRUEnever evaluated
FALSEevaluated 4 times by 3 tests
Evaluated by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
0-70
477 pollTimer->start();-
478 break;
executed 66 times by 16 tests: break;
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
66
479 }-
480 }
executed 74 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
74
481 performAsyncConfigurationUpdate();-
482}
executed 70 times by 18 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
70
483-
484void QNetworkConfigurationManagerPrivate::pollEngines()-
485{-
486 QMutexLocker locker(&mutex);-
487-
488 for (QBearerEngine *engine : qAsConst(sessionEngines)) {-
489 if (engine->requiresPolling() && (forcedPolling || engine->configurationsInUse())) {
engine->requiresPolling()Description
TRUEevaluated 51 times by 4 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
FALSEevaluated 51 times by 4 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
forcedPollingDescription
TRUEevaluated 51 times by 4 tests
Evaluated by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
FALSEnever evaluated
engine->configurationsInUse()Description
TRUEnever evaluated
FALSEnever evaluated
0-51
490 pollingEngines.insert(engine);-
491 QMetaObject::invokeMethod(engine, "requestUpdate");-
492 }
executed 51 times by 4 tests: end of block
Executed by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
51
493 }
executed 102 times by 4 tests: end of block
Executed by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
102
494}
executed 51 times by 4 tests: end of block
Executed by:
  • tst_QHostInfo
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QUdpSocket
51
495-
496void QNetworkConfigurationManagerPrivate::enablePolling()-
497{-
498 QMutexLocker locker(&mutex);-
499-
500 ++forcedPolling;-
501-
502 if (forcedPolling == 1)
forcedPolling == 1Description
TRUEevaluated 31 times by 16 tests
Evaluated by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
FALSEevaluated 401 times by 9 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkDiskCache
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QXmlInputSource
  • tst_Spdy
31-401
503 QMetaObject::invokeMethod(this, "startPolling");
executed 31 times by 16 tests: QMetaObject::invokeMethod(this, "startPolling");
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
31
504}
executed 432 times by 19 tests: end of block
Executed by:
  • tst_NetworkSelfTest
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHostInfo
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkInterface
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QUdpSocket
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
432
505-
506void QNetworkConfigurationManagerPrivate::disablePolling()-
507{-
508 QMutexLocker locker(&mutex);-
509-
510 --forcedPolling;-
511}
executed 433 times by 22 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QFtp
  • tst_QHttpNetworkConnection
  • tst_QNetworkAccessManager
  • tst_QNetworkAccessManager_And_QProgressDialog
  • tst_QNetworkConfiguration
  • tst_QNetworkConfigurationManager
  • tst_QNetworkDiskCache
  • tst_QNetworkProxyFactory
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_QTcpServer
  • tst_QXmlInputSource
  • tst_QXmlStream
  • tst_Spdy
  • tst_networkselftest - unknown status
  • tst_qabstractnetworkcache - unknown status
  • tst_qhostinfo - unknown status
  • tst_qnetworkinterface - unknown status
  • tst_qnetworksession - unknown status
  • tst_qudpsocket - unknown status
  • tst_spdy - unknown status
433
512-
513QT_END_NAMESPACE-
514-
515#endif // QT_NO_BEARERMANAGEMENT-
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9