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