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-
QBearerEngine::QBearerEngine(QObject *parent)
: QObject(parent), mutexstatic void cleanUpConfigurations(QMutex::Recursive)
{
}
QBearerEngine::~QBearerEngine()
{
QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator it;QHash<QString, QNetworkConfigurationPrivatePointer>::Iterator end;> &configurations)
8{-
9 for (it = snapConfigurations.begin(), end = snapConfigurations.end(); it != end; ++it)const auto &ptr : qAsConst(configurations)) {-
10 it.value()->ptr->isValid = false;-
11 it.value()->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 snapConfigurationsconfigurations.clear();-
for}
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
  • ...
15-
16static bool hasUsedConfiguration(it = accessPointConfigurations.begin(), endconst QHash<QString, QNetworkConfigurationPrivatePointer> &configurations)-
17{-
18 auto isUsed = accessPointConfigurations.end();-
it != end; ++it[](const QNetworkConfigurationPrivatePointer &ptr) {
19 itreturn
executed 8 times by 3 tests: return ptr->ref.load() > 1;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 8 times by 3 tests: return ptr->ref.load() > 1;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
ptr->ref.value()->isValid = falseload() > 1;
executed 8 times by 3 tests: return ptr->ref.load() > 1;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
8
20 it.value()->id.clear();-
}
accessPointConfigurations};
21 const auto end = configurations.clearend();-
22 forreturn
executed 12 times by 3 tests: return std::find_if(configurations.begin(), end, isUsed) != end;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
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(it = userChoiceConfigurationsconfigurations.begin(), end = userChoiceConfigurations.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
it
executed 12 times by 3 tests: return std::find_if(configurations.begin(), end, isUsed) != end;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 12 times by 3 tests: return std::find_if(configurations.begin(), end, isUsed) != end;
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
, 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
++it}
24-
25QBearerEngine::QBearerEngine(QObject *parent)-
26 : QObject(parent), mutex(QMutex::Recursive)-
27{-
it.value()->isValid = false;
it.value()->id.clear();}
29-
30QBearerEngine::~QBearerEngine()-
31{-
32 cleanUpConfigurations(snapConfigurations);-
33 cleanUpConfigurations(accessPointConfigurations);-
34 cleanUpConfigurations(userChoiceConfigurations.clear(););-
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 false;-
40}-
41-
42-
43-
44-
45-
46-
47-
48bool QBearerEngine::configurationsInUse() const-
49{-
50 QHash<QString, QNetworkConfigurationPrivatePointer>::ConstIterator it;-
QHash<QString, QNetworkConfigurationPrivatePointer>::ConstIterator end;QMutexLocker locker(&mutex);
51 forreturn
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
hasUsedConfiguration(it = accessPointConfigurations.constBegin(),
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
4
end =
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
accessPointConfigurations.constEnd(); it != end; ++it) {
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
if (it.value()->ref.load() > 1
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
)
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
52 return true;
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
4
}
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
for
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
|| hasUsedConfiguration(it = snapConfigurations.constBegin(),
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
end =
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
snapConfigurations.constEnd(); it != end; ++it) {
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
if (it.value()->ref.load() > 1
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
)
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
53 return true;
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
4
}
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
for
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
|| hasUsedConfiguration(it = userChoiceConfigurations.constBegin(),
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
end =
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
userChoiceConfigurations.constEnd(); it != end; ++it) {
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
if (it.value()->ref.load() > 1)
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
return true;
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
}
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
return false;
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
);
executed 4 times by 3 tests: return hasUsedConfiguration(accessPointConfigurations) || hasUsedConfiguration(snapConfigurations) || hasUsedConfiguration(userChoiceConfigurations);
Executed by:
  • tst_QFtp
  • tst_QNetworkConfigurationManager
  • tst_QTcpServer
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