qbearerengine.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/bearer/qbearerengine.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7static void cleanUpConfigurations(QHash<QString, QNetworkConfigurationPrivatePointer> &configurations)-
8{-
9 for (const auto &ptr : qAsConst(configurations)) {-
10 ptr->isValid = false;-
11 ptr->id.clear();-
12 }
executed 60 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
60
13 configurations.clear();-
14}
executed 174 times by 34 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
  • 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
  • ...
174
15-
16static bool hasUsedConfiguration(const QHash<QString, QNetworkConfigurationPrivatePointer> &configurations)-
17{-
18 auto isUsed = [](const QNetworkConfigurationPrivatePointer &ptr) {-
19 return
executed 8 times by 3 tests: return ptr->ref.load() > 1;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
ptr->ref.load() > 1;
executed 8 times by 3 tests: return ptr->ref.load() > 1;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
8
20 };-
21 const auto end = configurations.end();-
22 return
executed 12 times by 3 tests: return std::find_if(configurations.begin(), end, isUsed) != end;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
std::find_if(configurations.begin(), end, isUsed) != end;
executed 12 times by 3 tests: return std::find_if(configurations.begin(), end, isUsed) != end;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
12
23}-
24-
25QBearerEngine::QBearerEngine(QObject *parent)-
26 : QObject(parent), mutex(QMutex::Recursive)-
27{-
28}
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
29-
30QBearerEngine::~QBearerEngine()-
31{-
32 cleanUpConfigurations(snapConfigurations);-
33 cleanUpConfigurations(accessPointConfigurations);-
34 cleanUpConfigurations(userChoiceConfigurations);-
35}
executed 58 times by 34 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
  • 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
  • ...
58
36-
37bool QBearerEngine::requiresPolling() const-
38{-
39 return
executed 122 times by 18 tests: return false;
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
false;
executed 122 times by 18 tests: return false;
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
122
40}-
41-
42-
43-
44-
45-
46-
47-
48bool QBearerEngine::configurationsInUse() const-
49{-
50 QMutexLocker locker(&mutex);-
51 return
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
hasUsedConfiguration(accessPointConfigurations)
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
4
52 || hasUsedConfiguration(snapConfigurations)
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
4
53 || hasUsedConfiguration(userChoiceConfigurations);
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
4
54}-
55-
56-
57-
58-
59-
Switch to Source codePreprocessed file

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