| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| namespace { namespace Q_QGS_loader { typedef QFactoryLoader Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized) guard.store(QtGlobalStatic::Destroyed); } }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ("org.qt-project.Qt.QBearerEngineFactoryInterface", QLatin1String("/bearer")))) : value ("org.qt-project.Qt.QBearerEngineFactoryInterface", QLatin1String("/bearer")) { guard.store(QtGlobalStatic::Initialized); } } holder; return &holder.value; } } } static QGlobalStatic<QFactoryLoader, Q_QGS_loader::innerFunction, Q_QGS_loader::guard> loader;QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate() | |
| 13 | : QObject(), pollTimer(0), mutex(QMutex::Recursive), forcedPolling(0), firstUpdate(true) | - |
| 14 | { | - |
| 15 | qRegisterMetaType<QNetworkConfiguration>(); | - |
| 16 | qRegisterMetaType<QNetworkConfigurationPrivatePointer>(); | - |
| 17 | } | - |
| 18 | | - |
| 19 | void QNetworkConfigurationManagerPrivate::initialize() | - |
| 20 | { | - |
| 21 | | - |
| 22 | bearerThread = new QDaemonThread(); | - |
| 23 | bearerThread->setObjectName(([]() -> QString { enum { Size = sizeof(u"" "Qt bearer thread")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "Qt bearer thread" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }())); | - |
| 24 | | - |
| 25 | bearerThread->moveToThread(QCoreApplicationPrivate::mainThread()); | - |
| 26 | moveToThread(bearerThread); | - |
| 27 | bearerThread->start(); | - |
| 28 | updateConfigurations(); | - |
| 29 | } | - |
| 30 | | - |
| 31 | QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate() | - |
| 32 | { | - |
| 33 | QMutexLocker locker(&mutex); | - |
| 34 | | - |
| 35 | qDeleteAll(sessionEngines); | - |
| 36 | sessionEngines.clear(); | - |
| 37 | if (bearerThread) | - |
| 38 | bearerThread->quit(); | - |
| 39 | } | - |
| 40 | | - |
| 41 | void QNetworkConfigurationManagerPrivate::cleanup() | - |
| 42 | { | - |
| 43 | QThread* thread = bearerThread; | - |
| 44 | deleteLater(); | - |
| 45 | if (thread->wait(5000)) | - |
| 46 | delete thread; | - |
| 47 | } | - |
| 48 | | - |
| 49 | QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration() const | - |
| 50 | { | - |
| 51 | QMutexLocker locker(&mutex); | - |
| 52 | | - |
| 53 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(sessionEngines)>::type> _container_((sessionEngines)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1)for (QBearerEngine *engine = *_container_.i; _container_.control; _container_.control = 0: sessionEngines) { | - |
| 54 | QNetworkConfigurationPrivatePointer ptr = engine->defaultConfiguration(); | - |
| 55 | if (ptr| TRUE | evaluated 301 times by 18 testsEvaluated 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
| | FALSE | never evaluated |
) { | 0-301 |
| 56 | QNetworkConfiguration config; | - |
| 57 | config.d = ptr; | - |
| 58 | returnexecuted 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
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 |
| 59 | } | - |
| 60 | } never executed: end of block | 0 |
| 61 | | - |
| 62 | | - |
| 63 | | - |
| 64 | | - |
| 65 | QNetworkConfigurationPrivatePointer defaultConfiguration; | - |
| | |
| for (QForeachContainer<typename QtPrivate::remove_reference<decltype(sessionEngines)>::type> _container_((sessionEngines)); _container_.control && _container_.i != _container_.e; | |
| 66 | | - |
| 67 | ++_container_.i, _container_.control ^= 1)for (QBearerEngine *engine = *_container_.i; _container_.control; _container_.control = 0: sessionEngines) { | - |
| 68 | QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it; | - |
| QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;QMutexLocker locker(&engine->mutex); | |
| 69 | | - |
| 70 | for (it = engine->snapConfigurations.begin(), | - |
| end =const auto &ptr : qAsConst(engine->snapConfigurations.end(); it != end; ++it))) { | |
| 71 | QNetworkConfigurationPrivatePointer ptr = it.value();QMutexLocker configLocker(&ptr->mutex); | - |
| 72 | | - |
| 73 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
ptr->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 74 | QNetworkConfiguration config; | - |
| 75 | config.d = ptr; | - |
| 76 | return never executed: return config; config;never executed: return config; | 0 |
| 77 | } else if (!defaultConfiguration| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 78 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
ptr->state & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered| TRUE | never evaluated | | FALSE | never evaluated |
) | 0 |
| 79 | defaultConfiguration = ptr; never executed: defaultConfiguration = ptr; | 0 |
| 80 | } never executed: end of block | 0 |
| 81 | } never executed: end of block | 0 |
| 82 | } never executed: end of block | 0 |
| 83 | | - |
| 84 | | - |
| 85 | if (defaultConfiguration| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 86 | QNetworkConfiguration config; | - |
| 87 | config.d = defaultConfiguration; | - |
| 88 | return never executed: return config; config;never executed: return config; | 0 |
| 89 | } | - |
| 90 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(sessionEngines)>::type> _container_((sessionEngines)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1)for (QBearerEngine *engine = *_container_.i; _container_.control; _container_.control = 0: sessionEngines) { | - |
| 91 | | - |
| 92 | QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it; | - |
| QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;QMutexLocker locker(&engine->mutex); | |
| 93 | | - |
| 94 | for (it = engine->accessPointConfigurations.begin(), | - |
| end =const auto &ptr : qAsConst(engine->accessPointConfigurations.end(); it != end; ++it))) { | |
| 95 | | - |
| 96 | QNetworkConfigurationPrivatePointer ptr = it.value();QMutexLocker configLocker(&ptr->mutex); | - |
| 97 | QNetworkConfiguration::BearerType bearerType = ptr->bearerType; | - |
| 98 | | - |
| 99 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
ptr->state & QNetworkConfiguration::Discovered) == QNetworkConfiguration::Discovered| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 100 | if (!defaultConfiguration| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 101 | defaultConfiguration = ptr; | - |
| 102 | } never executed: end of block else { | 0 |
| 103 | QMutexLocker defaultConfigLocker(&defaultConfiguration->mutex); | - |
| 104 | | - |
| 105 | if (defaultConfiguration->state == ptr->state| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 106 | switch (defaultConfiguration->bearerType) { | - |
| 107 | case never executed: case QNetworkConfiguration::BearerEthernet: QNetworkConfiguration::BearerEthernet:never executed: case QNetworkConfiguration::BearerEthernet: | 0 |
| 108 | | - |
| 109 | break; never executed: break; | 0 |
| 110 | case never executed: case QNetworkConfiguration::BearerWLAN: QNetworkConfiguration::BearerWLAN:never executed: case QNetworkConfiguration::BearerWLAN: | 0 |
| 111 | | - |
| 112 | defaultConfiguration = ptr; | - |
| 113 | break; never executed: break; | 0 |
| 114 | default never executed: default: :never executed: default: | 0 |
| 115 | | - |
| 116 | if (bearerType == QNetworkConfiguration::BearerEthernet| TRUE | never evaluated | | FALSE | never evaluated |
|| | 0 |
| 117 | bearerType == QNetworkConfiguration::BearerWLAN| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 118 | defaultConfiguration = ptr; | - |
| 119 | } never executed: end of block | 0 |
| 120 | } never executed: end of block | 0 |
| 121 | } else { | - |
| 122 | | - |
| 123 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
defaultConfiguration->state & QNetworkConfiguration::Active) !=| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 124 | QNetworkConfiguration::Active| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 125 | defaultConfiguration = ptr; | - |
| 126 | } never executed: end of block | 0 |
| 127 | } never executed: end of block | 0 |
| 128 | } | - |
| 129 | } | - |
| 130 | } never executed: end of block | 0 |
| 131 | } never executed: end of block | 0 |
| 132 | | - |
| 133 | | - |
| 134 | if (defaultConfiguration| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 135 | QNetworkConfiguration config; | - |
| 136 | config.d = defaultConfiguration; | - |
| 137 | return never executed: return config; config;never executed: return config; | 0 |
| 138 | } | - |
| 139 | | - |
| 140 | return never executed: return QNetworkConfiguration(); QNetworkConfiguration();never executed: return QNetworkConfiguration(); | 0 |
| 141 | } | - |
| 142 | | - |
| 143 | QList<QNetworkConfiguration> QNetworkConfigurationManagerPrivate::allConfigurations(QNetworkConfiguration::StateFlags filter) const | - |
| 144 | { | - |
| 145 | QList<QNetworkConfiguration> result; | - |
| 146 | | - |
| 147 | QMutexLocker locker(&mutex); | - |
| 148 | | - |
| 149 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(sessionEngines)>::type> _container_((sessionEngines)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1)for (QBearerEngine *engine = *_container_.i; _container_.control; _container_.control = 0: sessionEngines) { | - |
| 150 | | - |
| 151 | QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it; | - |
| QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;QMutexLocker locker(&engine->mutex); | |
| 152 | | - |
| 153 | | - |
| 154 | for (it = engine->accessPointConfigurations.begin(), | - |
| end =const auto &ptr : qAsConst(engine->accessPointConfigurations.end(); it != end; ++it))) { | |
| 155 | QNetworkConfigurationPrivatePointer ptr = it.value();QMutexLocker configLocker(&ptr->mutex); | - |
| 156 | | - |
| 157 | if ((| TRUE | evaluated 81 times by 4 testsEvaluated by:- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkProxyFactory
- tst_QNetworkSession
| | FALSE | evaluated 3 times by 1 testEvaluated by:- tst_QNetworkConfigurationManager
|
ptr->state & filter) == filter| TRUE | evaluated 81 times by 4 testsEvaluated by:- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkProxyFactory
- tst_QNetworkSession
| | FALSE | evaluated 3 times by 1 testEvaluated by:- tst_QNetworkConfigurationManager
|
) { | 3-81 |
| 158 | QNetworkConfiguration pt; | - |
| 159 | pt.d = ptr; | - |
| 160 | result << pt; | - |
| 161 | }executed 81 times by 4 tests: end of blockExecuted by:- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkProxyFactory
- tst_QNetworkSession
| 81 |
| 162 | }executed 84 times by 4 tests: end of blockExecuted by:- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkProxyFactory
- tst_QNetworkSession
| 84 |
| 163 | | - |
| 164 | | - |
| 165 | for (it = engine->snapConfigurations.begin(), | - |
| end =const auto &ptr : qAsConst(engine->snapConfigurations.end(); it != end; ++it))) { | |
| 166 | QNetworkConfigurationPrivatePointer ptr = it.value();QMutexLocker configLocker(&ptr->mutex); | - |
| 167 | | - |
| 168 | if ((| TRUE | never evaluated | | FALSE | never evaluated |
ptr->state & filter) == filter| TRUE | never evaluated | | FALSE | never evaluated |
) { | 0 |
| 169 | QNetworkConfiguration pt; | - |
| 170 | pt.d = ptr; | - |
| 171 | result << pt; | - |
| 172 | } never executed: end of block | 0 |
| 173 | } never executed: end of block | 0 |
| 174 | }executed 56 times by 4 tests: end of blockExecuted by:- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkProxyFactory
- tst_QNetworkSession
| 56 |
| 175 | | - |
| 176 | returnexecuted 28 times by 4 tests: return result;Executed by:- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkProxyFactory
- tst_QNetworkSession
result;executed 28 times by 4 tests: return result;Executed by:- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkProxyFactory
- tst_QNetworkSession
| 28 |
| 177 | } | - |
| 178 | | - |
| 179 | QNetworkConfiguration QNetworkConfigurationManagerPrivate::configurationFromIdentifier(const QString &identifier) const | - |
| 180 | { | - |
| 181 | QNetworkConfiguration item; | - |
| 182 | | - |
| 183 | QMutexLocker locker(&mutex); | - |
| 184 | | - |
| 185 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(sessionEngines)>::type> _container_((sessionEngines)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1)for (QBearerEngine *engine = *_container_.i; _container_.control; _container_.control = 0: sessionEngines) { | - |
| 186 | QMutexLocker locker(&engine->mutex); | - |
| 187 | if (auto ptr =| TRUE | evaluated 119 times by 3 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QNetworkConfigurationManager
- tst_QNetworkReply
| | FALSE | evaluated 4 times by 1 testEvaluated by:- tst_QNetworkConfigurationManager
|
engine->accessPointConfigurations.containsvalue(identifier)| TRUE | evaluated 119 times by 3 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QNetworkConfigurationManager
- tst_QNetworkReply
| | FALSE | evaluated 4 times by 1 testEvaluated by:- tst_QNetworkConfigurationManager
|
) { | 4-119 |
| 188 | item.d = engine->accessPointConfigurations[identifier]; | - |
| elsestd::move(ptr); | |
| 189 | break;executed 119 times by 3 tests: break;Executed by:- tst_QAbstractNetworkCache
- tst_QNetworkConfigurationManager
- tst_QNetworkReply
| 119 |
| 190 | } | - |
| 191 | if (auto ptr =| TRUE | never evaluated | | FALSE | evaluated 4 times by 1 testEvaluated by:- tst_QNetworkConfigurationManager
|
engine->snapConfigurations.containsvalue(identifier)| TRUE | never evaluated | | FALSE | evaluated 4 times by 1 testEvaluated by:- tst_QNetworkConfigurationManager
|
) { | 0-4 |
| 192 | item.d = engine->snapConfigurations[identifier]; | - |
| elsestd::move(ptr); | |
| 193 | break; never executed: break; | 0 |
| 194 | } | - |
| 195 | if (auto ptr =| TRUE | never evaluated | | FALSE | evaluated 4 times by 1 testEvaluated by:- tst_QNetworkConfigurationManager
|
engine->userChoiceConfigurations.containsvalue(identifier)| TRUE | never evaluated | | FALSE | evaluated 4 times by 1 testEvaluated by:- tst_QNetworkConfigurationManager
|
) { | 0-4 |
| 196 | item.d = engine->userChoiceConfigurations[identifier]; | - |
| else | |
| continue; | |
| | |
| return itemstd::move(ptr); | |
| 197 | break never executed: break; never executed: break; never executed: break; ;never executed: break; | 0 |
| 198 | } | - |
| 199 | }executed 4 times by 1 test: end of blockExecuted by:- tst_QNetworkConfigurationManager
| 4 |
| 200 | | - |
| 201 | returnexecuted 120 times by 3 tests: return item;Executed by:- tst_QAbstractNetworkCache
- tst_QNetworkConfigurationManager
- tst_QNetworkReply
item;executed 120 times by 3 tests: return item;Executed by:- tst_QAbstractNetworkCache
- tst_QNetworkConfigurationManager
- tst_QNetworkReply
| 120 |
| 202 | } | - |
| 203 | | - |
| 204 | bool QNetworkConfigurationManagerPrivate::isOnline() const | - |
| 205 | { | - |
| 206 | QMutexLocker locker(&mutex); | - |
| 207 | | - |
| 208 | | - |
| 209 | | - |
| 210 | return !allConfigurations(QNetworkConfiguration::Active).isEmpty(); | - |
| 211 | } | - |
| 212 | | - |
| 213 | QNetworkConfigurationManager::Capabilities QNetworkConfigurationManagerPrivate::capabilities() const | - |
| 214 | { | - |
| 215 | QMutexLocker locker(&mutex); | - |
| 216 | | - |
| 217 | QNetworkConfigurationManager::Capabilities capFlags; | - |
| | |
| for (QForeachContainer<typename QtPrivate::remove_reference<decltype(sessionEngines)>::type> _container_((sessionEngines)); _container_.control && _container_.i != _container_.e; | |
| 218 | | - |
| 219 | ++_container_.i, _container_.control ^= 1)for (QBearerEngine *engine = *_container_.i; _container_.control; _container_.control = 0: sessionEngines) | - |
| 220 | 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 |
| 221 | | - |
| 222 | returnexecuted 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
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 |
| 223 | } | - |
| 224 | | - |
| 225 | void QNetworkConfigurationManagerPrivate::configurationAdded(QNetworkConfigurationPrivatePointer ptr) | - |
| 226 | { | - |
| 227 | QMutexLocker locker(&mutex); | - |
| 228 | | - |
| 229 | if (!firstUpdate) { | - |
| 230 | QNetworkConfiguration item; | - |
| 231 | item.d = ptr; | - |
| 232 | configurationAdded(item); | - |
| 233 | } | - |
| 234 | | - |
| 235 | ptr->mutex.lock(); | - |
| 236 | if (ptr->state == QNetworkConfiguration::Active) { | - |
| 237 | ptr->mutex.unlock(); | - |
| 238 | onlineConfigurations.insert(ptr->id); | - |
| 239 | if (!firstUpdate && onlineConfigurations.count() == 1) | - |
| 240 | onlineStateChanged(true); | - |
| 241 | } else { | - |
| 242 | ptr->mutex.unlock(); | - |
| 243 | } | - |
| 244 | } | - |
| 245 | | - |
| 246 | void QNetworkConfigurationManagerPrivate::configurationRemoved(QNetworkConfigurationPrivatePointer ptr) | - |
| 247 | { | - |
| 248 | QMutexLocker locker(&mutex); | - |
| 249 | | - |
| 250 | ptr->mutex.lock(); | - |
| 251 | ptr->isValid = false; | - |
| 252 | ptr->mutex.unlock(); | - |
| 253 | | - |
| 254 | if (!firstUpdate) { | - |
| 255 | QNetworkConfiguration item; | - |
| 256 | item.d = ptr; | - |
| 257 | configurationRemoved(item); | - |
| 258 | } | - |
| 259 | | - |
| 260 | onlineConfigurations.remove(ptr->id); | - |
| 261 | if (!firstUpdate && onlineConfigurations.isEmpty()) | - |
| 262 | onlineStateChanged(false); | - |
| 263 | } | - |
| 264 | | - |
| 265 | void QNetworkConfigurationManagerPrivate::configurationChanged(QNetworkConfigurationPrivatePointer ptr) | - |
| 266 | { | - |
| 267 | QMutexLocker locker(&mutex); | - |
| 268 | | - |
| 269 | if (!firstUpdate) { | - |
| 270 | QNetworkConfiguration item; | - |
| 271 | item.d = ptr; | - |
| 272 | configurationChanged(item); | - |
| 273 | } | - |
| 274 | | - |
| 275 | bool previous = !onlineConfigurations.isEmpty(); | - |
| 276 | | - |
| 277 | ptr->mutex.lock(); | - |
| 278 | if (ptr->state == QNetworkConfiguration::Active) | - |
| 279 | onlineConfigurations.insert(ptr->id); | - |
| 280 | else | - |
| 281 | onlineConfigurations.remove(ptr->id); | - |
| 282 | ptr->mutex.unlock(); | - |
| 283 | | - |
| 284 | bool online = !onlineConfigurations.isEmpty(); | - |
| 285 | | - |
| 286 | if (!firstUpdate && online != previous) | - |
| 287 | onlineStateChanged(online); | - |
| 288 | } | - |
| 289 | | - |
| 290 | void QNetworkConfigurationManagerPrivate::updateConfigurations() | - |
| 291 | { | - |
| 292 | typedef QMultiMap<int, QString> PluginKeyMap; | - |
| 293 | typedef PluginKeyMap::const_iterator PluginKeyMapConstIterator; | - |
| 294 | QMutexLocker locker(&mutex); | - |
| 295 | | - |
| 296 | if (firstUpdate| TRUE | evaluated 18 times by 16 testsEvaluated 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
| | FALSE | evaluated 274 times by 18 testsEvaluated 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 |
| 297 | if (qobject_cast<QBearerEngine *>(sender())| TRUE | never evaluated | | FALSE | evaluated 18 times by 16 testsEvaluated 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 |
| 298 | return; never executed: return; | 0 |
| 299 | | - |
| 300 | updating = false; | - |
| 301 | | - |
| 302 | bool envOK = false; | - |
| 303 | const int skipGeneric = qgetenvqEnvironmentVariableIntValue("QT_EXCLUDE_GENERIC_BEARER").toInt(, &envOK); | - |
| 304 | QBearerEngine *generic = 0; | - |
| 305 | static QFactoryLoader loader("org.qt-project.Qt.QBearerEngineFactoryInterface", QLatin1String("/bearer")); | - |
| 306 | QFactoryLoader *l = loader();&loader; | - |
| 307 | const PluginKeyMap keyMap = l->keyMap(); | - |
| 308 | const PluginKeyMapConstIterator cend = keyMap.constEnd(); | - |
| 309 | QStringList addedEngines; | - |
| 310 | for (PluginKeyMapConstIterator it = keyMap.constBegin(); it != cend| TRUE | evaluated 54 times by 16 testsEvaluated 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
| | FALSE | evaluated 18 times by 16 testsEvaluated 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
|
; ++it) { | 18-54 |
| 311 | const QString &key = it.value(); | - |
| 312 | if (addedEngines.contains(key)| TRUE | never evaluated | | FALSE | evaluated 54 times by 16 testsEvaluated 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 |
| 313 | continue; never executed: continue; | 0 |
| 314 | | - |
| 315 | addedEngines.append(key); | - |
| 316 | if (QBearerEngine *engine = qLoadPlugin<QBearerEngine, QBearerEnginePlugin>(l, key)| TRUE | evaluated 36 times by 16 testsEvaluated 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
| | FALSE | evaluated 18 times by 16 testsEvaluated 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 |
| 317 | if (key == QLatin1String("generic")| TRUE | evaluated 18 times by 16 testsEvaluated 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
| | FALSE | evaluated 18 times by 16 testsEvaluated 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 |
| 318 | 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 |
| 319 | else | - |
| 320 | 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 |
| 321 | | - |
| 322 | engine->moveToThread(bearerThread); | - |
| 323 | | - |
| 324 | connect(engine, qFlagLocation("2""updateCompleted()" "\0" __FILE__ ":" "403""387"), | - |
| 325 | this, qFlagLocation("1""updateConfigurations()" "\0" __FILE__ ":" "404""388"), | - |
| 326 | Qt::QueuedConnection); | - |
| 327 | connect(engine, qFlagLocation("2""configurationAdded(QNetworkConfigurationPrivatePointer)" "\0" __FILE__ ":" "406""390"), | - |
| 328 | this, qFlagLocation("1""configurationAdded(QNetworkConfigurationPrivatePointer)" "\0" __FILE__ ":" "407""391"), | - |
| 329 | Qt::QueuedConnection); | - |
| 330 | connect(engine, qFlagLocation("2""configurationRemoved(QNetworkConfigurationPrivatePointer)" "\0" __FILE__ ":" "409""393"), | - |
| 331 | this, qFlagLocation("1""configurationRemoved(QNetworkConfigurationPrivatePointer)" "\0" __FILE__ ":" "410""394"), | - |
| 332 | Qt::QueuedConnection); | - |
| 333 | connect(engine, qFlagLocation("2""configurationChanged(QNetworkConfigurationPrivatePointer)" "\0" __FILE__ ":" "412""396"), | - |
| 334 | this, qFlagLocation("1""configurationChanged(QNetworkConfigurationPrivatePointer)" "\0" __FILE__ ":" "413""397"), | - |
| 335 | Qt::QueuedConnection); | - |
| 336 | }executed 36 times by 16 tests: end of blockExecuted 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 |
| 337 | }executed 54 times by 16 tests: end of blockExecuted 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 |
| 338 | | - |
| 339 | if (generic| TRUE | evaluated 18 times by 16 testsEvaluated 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
| | FALSE | never evaluated |
) { | 0-18 |
| 340 | if (!envOK| TRUE | evaluated 18 times by 16 testsEvaluated 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
| | FALSE | never evaluated |
|| skipGeneric <= 0| TRUE | never evaluated | | FALSE | never evaluated |
) | 0-18 |
| 341 | 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 |
| 342 | else | - |
| 343 | delete generic; never executed: delete generic; | 0 |
| 344 | } | - |
| 345 | }executed 18 times by 16 tests: end of blockExecuted 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 |
| 346 | | - |
| 347 | QBearerEngine *engine = qobject_cast<QBearerEngine *>(sender()); | - |
| 348 | if (engine| TRUE | evaluated 274 times by 18 testsEvaluated 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
| | FALSE | evaluated 18 times by 16 testsEvaluated 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()| TRUE | evaluated 168 times by 18 testsEvaluated 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
| | FALSE | evaluated 106 times by 18 testsEvaluated 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 |
| 349 | 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 |
| 350 | | - |
| 351 | if (updating| TRUE | evaluated 168 times by 18 testsEvaluated 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
| | FALSE | evaluated 124 times by 18 testsEvaluated 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()| TRUE | evaluated 82 times by 18 testsEvaluated 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
| | FALSE | evaluated 86 times by 18 testsEvaluated 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 |
| 352 | updating = false; | - |
| 353 | configurationUpdateComplete(); | - |
| 354 | }executed 82 times by 18 tests: end of blockExecuted 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 |
| 355 | | - |
| 356 | if (engine| TRUE | evaluated 274 times by 18 testsEvaluated 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
| | FALSE | evaluated 18 times by 16 testsEvaluated 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()| TRUE | evaluated 51 times by 4 testsEvaluated by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
| | FALSE | evaluated 223 times by 18 testsEvaluated 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 |
| 357 | pollingEngines.remove(engine); | - |
| 358 | if (pollingEngines.isEmpty()| TRUE | evaluated 51 times by 4 testsEvaluated by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
| | FALSE | never evaluated |
) | 0-51 |
| 359 | startPolling();executed 51 times by 4 tests: startPolling();Executed by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
| 51 |
| 360 | }executed 51 times by 4 tests: end of blockExecuted by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
| 51 |
| 361 | | - |
| 362 | if (firstUpdate| TRUE | evaluated 18 times by 16 testsEvaluated 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
| | FALSE | evaluated 274 times by 18 testsEvaluated 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 |
| 363 | firstUpdate = false; | - |
| 364 | const QList<QBearerEngine*> enginesToInitialize = sessionEngines; | - |
| 365 | locker.unlock(); | - |
| 366 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(enginesToInitialize)>::type> _container_((enginesToInitialize)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1)for (QBearerEngine* engine = *_container_.i; _container_.control; _container_.control = 0: enginesToInitialize) | - |
| 367 | {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 |
| 368 | }}executed 18 times by 16 tests: end of blockExecuted 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 |
| 369 | }executed 292 times by 18 tests: end of blockExecuted 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 |
| 370 | | - |
| 371 | void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate() | - |
| 372 | { | - |
| 373 | QMutexLocker locker(&mutex); | - |
| 374 | | - |
| 375 | if (sessionEngines.isEmpty()| TRUE | never evaluated | | FALSE | evaluated 86 times by 18 testsEvaluated 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 |
| 376 | configurationUpdateComplete(); | - |
| 377 | return; never executed: return; | 0 |
| 378 | } | - |
| 379 | | - |
| 380 | updating = true; | - |
| | |
| for (QForeachContainer<typename QtPrivate::remove_reference<decltype(sessionEngines)>::type> _container_((sessionEngines)); _container_.control && _container_.i != _container_.e; | |
| 381 | | - |
| 382 | ++_container_.i, _container_.control ^= 1)for (QBearerEngine *engine = *_container_.i; _container_.control; _container_.control = 0): qAsConst(sessionEngines)) { | - |
| 383 | updatingEngines.insert(engine); | - |
| 384 | QMetaObject::invokeMethod(engine, "requestUpdate"); | - |
| 385 | }executed 172 times by 18 tests: end of blockExecuted 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 |
| 386 | }executed 86 times by 18 tests: end of blockExecuted 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 |
| 387 | | - |
| 388 | QList<QBearerEngine *> QNetworkConfigurationManagerPrivate::engines() const | - |
| 389 | { | - |
| 390 | QMutexLocker locker(&mutex); | - |
| 391 | | - |
| 392 | return sessionEngines; | - |
| 393 | } | - |
| 394 | | - |
| 395 | void QNetworkConfigurationManagerPrivate::startPolling() | - |
| 396 | { | - |
| 397 | QMutexLocker locker(&mutex); | - |
| 398 | if (!pollTimer| TRUE | evaluated 19 times by 17 testsEvaluated 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
| | FALSE | evaluated 64 times by 10 testsEvaluated 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 |
| 399 | pollTimer = new QTimer(this); | - |
| 400 | bool ok; | - |
| 401 | int interval = qgetenvqEnvironmentVariableIntValue("QT_BEARER_POLL_TIMEOUT").toInt(, &ok); | - |
| 402 | if (!ok| TRUE | evaluated 19 times by 17 testsEvaluated 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
| | FALSE | never evaluated |
) | 0-19 |
| 403 | interval = 10000;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 |
| 404 | pollTimer->setInterval(interval); | - |
| 405 | pollTimer->setSingleShot(true); | - |
| 406 | connect(pollTimer, qFlagLocation("2""timeout()" "\0" __FILE__ ":" "487""469"), this, qFlagLocation("1""pollEngines()" "\0" __FILE__ ":" "487""469")); | - |
| 407 | }executed 19 times by 17 tests: end of blockExecuted 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 |
| 408 | | - |
| 409 | if (pollTimer->isActive()| TRUE | evaluated 13 times by 6 testsEvaluated by:- tst_QNetworkAccessManager
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
| | FALSE | evaluated 70 times by 18 testsEvaluated 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 |
| 410 | returnexecuted 13 times by 6 tests: return;Executed by:- tst_QNetworkAccessManager
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
;executed 13 times by 6 tests: return;Executed by:- tst_QNetworkAccessManager
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
| 13 |
| | |
| for (QForeachContainer<typename QtPrivate::remove_reference<decltype(sessionEngines)>::type> _container_((sessionEngines)); _container_.control && _container_.i != _container_.eexecuted 13 times by 6 tests: return;Executed by:- tst_QNetworkAccessManager
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
executed 13 times by 6 tests: return;Executed by:- tst_QNetworkAccessManager
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
;executed 13 times by 6 tests: return;Executed by:- tst_QNetworkAccessManager
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkConfiguration
- tst_QNetworkConfigurationManager
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
| |
| 411 | | - |
| 412 | ++_container_.i, _container_.control ^= 1)for (QBearerEngine *engine = *_container_.i; _container_.control; _container_.control = 0): qAsConst(sessionEngines)) { | - |
| 413 | if (engine->requiresPolling()| TRUE | evaluated 70 times by 18 testsEvaluated 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
| | FALSE | evaluated 70 times by 18 testsEvaluated 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
|
&& (forcedPolling| TRUE | evaluated 66 times by 16 testsEvaluated 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
| | FALSE | evaluated 4 times by 3 testsEvaluated by:- tst_QFtp
- tst_QNetworkConfigurationManager
- tst_QTcpServer
|
|| engine->configurationsInUse()| TRUE | never evaluated | | FALSE | evaluated 4 times by 3 testsEvaluated by:- tst_QFtp
- tst_QNetworkConfigurationManager
- tst_QTcpServer
|
)) { | 0-70 |
| 414 | pollTimer->start(); | - |
| 415 | 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 |
| 416 | } | - |
| 417 | }executed 74 times by 18 tests: end of blockExecuted 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 |
| 418 | performAsyncConfigurationUpdate(); | - |
| 419 | }executed 70 times by 18 tests: end of blockExecuted 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 |
| 420 | | - |
| 421 | void QNetworkConfigurationManagerPrivate::pollEngines() | - |
| 422 | { | - |
| 423 | QMutexLocker locker(&mutex); | - |
| 424 | | - |
| 425 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(sessionEngines)>::type> _container_((sessionEngines)); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1)for (QBearerEngine *engine = *_container_.i; _container_.control; _container_.control = 0): qAsConst(sessionEngines)) { | - |
| 426 | if (engine->requiresPolling()| TRUE | evaluated 51 times by 4 testsEvaluated by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
| | FALSE | evaluated 51 times by 4 testsEvaluated by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
|
&& (forcedPolling| TRUE | evaluated 51 times by 4 testsEvaluated by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
| | FALSE | never evaluated |
|| engine->configurationsInUse()| TRUE | never evaluated | | FALSE | never evaluated |
)) { | 0-51 |
| 427 | pollingEngines.insert(engine); | - |
| 428 | QMetaObject::invokeMethod(engine, "requestUpdate"); | - |
| 429 | }executed 51 times by 4 tests: end of blockExecuted by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
| 51 |
| 430 | }executed 102 times by 4 tests: end of blockExecuted by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
| 102 |
| 431 | }executed 51 times by 4 tests: end of blockExecuted by:- tst_QHostInfo
- tst_QNetworkReply
- tst_QNetworkSession
- tst_QUdpSocket
| 51 |
| 432 | | - |
| 433 | void QNetworkConfigurationManagerPrivate::enablePolling() | - |
| 434 | { | - |
| 435 | QMutexLocker locker(&mutex); | - |
| 436 | | - |
| 437 | ++forcedPolling; | - |
| 438 | | - |
| 439 | if (forcedPolling == 1) | - |
| 440 | QMetaObject::invokeMethod(this, "startPolling"); | - |
| 441 | } | - |
| 442 | | - |
| 443 | void QNetworkConfigurationManagerPrivate::disablePolling() | - |
| 444 | { | - |
| 445 | QMutexLocker locker(&mutex); | - |
| 446 | | - |
| 447 | --forcedPolling; | - |
| 448 | } | - |
| 449 | | - |
| 450 | | - |
| | |