| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | QNetworkConfiguration::QNetworkConfiguration() | - |
| 4 | : d(0) | - |
| 5 | { | - |
| 6 | } executed: }Execution Count:3347 | 3347 |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | QNetworkConfiguration::QNetworkConfiguration(const QNetworkConfiguration &other) | - |
| 12 | : d(other.d) | - |
| 13 | { | - |
| 14 | } executed: }Execution Count:260 | 260 |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | QNetworkConfiguration::~QNetworkConfiguration() | - |
| 20 | { | - |
| 21 | } | - |
| 22 | | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | QNetworkConfiguration &QNetworkConfiguration::operator=(const QNetworkConfiguration &other) | - |
| 27 | { | - |
| 28 | d = other.d; | - |
| 29 | return *this; executed: return *this;Execution Count:193 | 193 |
| 30 | } | - |
| 31 | bool QNetworkConfiguration::operator==(const QNetworkConfiguration &other) const | - |
| 32 | { | - |
| 33 | return (d == other.d); executed: return (d == other.d);Execution Count:73 | 73 |
| 34 | } | - |
| 35 | QString QNetworkConfiguration::name() const | - |
| 36 | { | - |
| 37 | if (!d) evaluated: !d| yes Evaluation Count:6 | yes Evaluation Count:51 |
| 6-51 |
| 38 | return QString(); executed: return QString();Execution Count:6 | 6 |
| 39 | | - |
| 40 | QMutexLocker locker(&d->mutex); | - |
| 41 | return d->name; executed: return d->name;Execution Count:51 | 51 |
| 42 | } | - |
| 43 | | - |
| 44 | | - |
| 45 | | - |
| 46 | | - |
| 47 | | - |
| 48 | QString QNetworkConfiguration::identifier() const | - |
| 49 | { | - |
| 50 | if (!d) evaluated: !d| yes Evaluation Count:2 | yes Evaluation Count:299 |
| 2-299 |
| 51 | return QString(); executed: return QString();Execution Count:2 | 2 |
| 52 | | - |
| 53 | QMutexLocker locker(&d->mutex); | - |
| 54 | return d->id; executed: return d->id;Execution Count:299 | 299 |
| 55 | } | - |
| 56 | QNetworkConfiguration::Type QNetworkConfiguration::type() const | - |
| 57 | { | - |
| 58 | if (!d) evaluated: !d| yes Evaluation Count:7 | yes Evaluation Count:99 |
| 7-99 |
| 59 | return QNetworkConfiguration::Invalid; executed: return QNetworkConfiguration::Invalid;Execution Count:7 | 7 |
| 60 | | - |
| 61 | QMutexLocker locker(&d->mutex); | - |
| 62 | return d->type; executed: return d->type;Execution Count:99 | 99 |
| 63 | } | - |
| 64 | bool QNetworkConfiguration::isValid() const | - |
| 65 | { | - |
| 66 | if (!d) evaluated: !d| yes Evaluation Count:100 | yes Evaluation Count:131 |
| 100-131 |
| 67 | return false; executed: return false;Execution Count:100 | 100 |
| 68 | | - |
| 69 | QMutexLocker locker(&d->mutex); | - |
| 70 | return d->isValid; executed: return d->isValid;Execution Count:131 | 131 |
| 71 | } | - |
| 72 | | - |
| 73 | | - |
| 74 | | - |
| 75 | | - |
| 76 | QNetworkConfiguration::StateFlags QNetworkConfiguration::state() const | - |
| 77 | { | - |
| 78 | if (!d) evaluated: !d| yes Evaluation Count:11 | yes Evaluation Count:161 |
| 11-161 |
| 79 | return QNetworkConfiguration::Undefined; executed: return QNetworkConfiguration::Undefined;Execution Count:11 | 11 |
| 80 | | - |
| 81 | QMutexLocker locker(&d->mutex); | - |
| 82 | return d->state; executed: return d->state;Execution Count:161 | 161 |
| 83 | } | - |
| 84 | QNetworkConfiguration::Purpose QNetworkConfiguration::purpose() const | - |
| 85 | { | - |
| 86 | if (!d) evaluated: !d| yes Evaluation Count:4 | yes Evaluation Count:26 |
| 4-26 |
| 87 | return QNetworkConfiguration::UnknownPurpose; executed: return QNetworkConfiguration::UnknownPurpose;Execution Count:4 | 4 |
| 88 | | - |
| 89 | QMutexLocker locker(&d->mutex); | - |
| 90 | return d->purpose; executed: return d->purpose;Execution Count:26 | 26 |
| 91 | } | - |
| 92 | | - |
| 93 | | - |
| 94 | | - |
| 95 | | - |
| 96 | bool QNetworkConfiguration::isRoamingAvailable() const | - |
| 97 | { | - |
| 98 | if (!d) evaluated: !d| yes Evaluation Count:2 | yes Evaluation Count:18 |
| 2-18 |
| 99 | return false; executed: return false;Execution Count:2 | 2 |
| 100 | | - |
| 101 | QMutexLocker locker(&d->mutex); | - |
| 102 | return d->roamingSupported; executed: return d->roamingSupported;Execution Count:18 | 18 |
| 103 | } | - |
| 104 | QList<QNetworkConfiguration> QNetworkConfiguration::children() const | - |
| 105 | { | - |
| 106 | QList<QNetworkConfiguration> results; | - |
| 107 | | - |
| 108 | if (!d) | 0 |
| 109 | return results; never executed: return results; | 0 |
| 110 | | - |
| 111 | QMutexLocker locker(&d->mutex); | - |
| 112 | | - |
| 113 | if (d->type != QNetworkConfiguration::ServiceNetwork || !d->isValid) never evaluated: d->type != QNetworkConfiguration::ServiceNetwork never evaluated: !d->isValid | 0 |
| 114 | return results; never executed: return results; | 0 |
| 115 | | - |
| 116 | QMutableMapIterator<unsigned int, QNetworkConfigurationPrivatePointer> i(d->serviceNetworkMembers); | - |
| 117 | while (i.hasNext()) { never evaluated: i.hasNext() | 0 |
| 118 | i.next(); | - |
| 119 | | - |
| 120 | QNetworkConfigurationPrivatePointer p = i.value(); | - |
| 121 | | - |
| 122 | | - |
| 123 | { | - |
| 124 | QMutexLocker childLocker(&p->mutex); | - |
| 125 | | - |
| 126 | if (!p->isValid) { never evaluated: !p->isValid | 0 |
| 127 | i.remove(); | - |
| 128 | continue; never executed: continue; | 0 |
| 129 | } | - |
| 130 | } | - |
| 131 | | - |
| 132 | QNetworkConfiguration item; | - |
| 133 | item.d = p; | - |
| 134 | results << item; | - |
| 135 | } | 0 |
| 136 | | - |
| 137 | return results; never executed: return results; | 0 |
| 138 | } | - |
| 139 | QNetworkConfiguration::BearerType QNetworkConfiguration::bearerType() const | - |
| 140 | { | - |
| 141 | if (!isValid()) partially evaluated: !isValid()| no Evaluation Count:0 | yes Evaluation Count:10 |
| 0-10 |
| 142 | return BearerUnknown; never executed: return BearerUnknown; | 0 |
| 143 | | - |
| 144 | QMutexLocker locker(&d->mutex); | - |
| 145 | | - |
| 146 | return d->bearerType; executed: return d->bearerType;Execution Count:10 | 10 |
| 147 | } | - |
| 148 | QString QNetworkConfiguration::bearerTypeName() const | - |
| 149 | { | - |
| 150 | if (!isValid()) evaluated: !isValid()| yes Evaluation Count:1 | yes Evaluation Count:4 |
| 1-4 |
| 151 | return QString(); executed: return QString();Execution Count:1 | 1 |
| 152 | | - |
| 153 | QMutexLocker locker(&d->mutex); | - |
| 154 | | - |
| 155 | if (d->type == QNetworkConfiguration::ServiceNetwork || partially evaluated: d->type == QNetworkConfiguration::ServiceNetwork| no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
| 156 | d->type == QNetworkConfiguration::UserChoice) partially evaluated: d->type == QNetworkConfiguration::UserChoice| no Evaluation Count:0 | yes Evaluation Count:4 |
| 0-4 |
| 157 | return QString(); never executed: return QString(); | 0 |
| 158 | | - |
| 159 | switch (d->bearerType) { | - |
| 160 | case BearerEthernet: | - |
| 161 | return QString::fromUtf8("" "Ethernet" "", sizeof("Ethernet") - 1); executed: return QString::fromUtf8("" "Ethernet" "", sizeof("Ethernet") - 1);Execution Count:4 | 4 |
| 162 | case BearerWLAN: | - |
| 163 | return QString::fromUtf8("" "WLAN" "", sizeof("WLAN") - 1); never executed: return QString::fromUtf8("" "WLAN" "", sizeof("WLAN") - 1); | 0 |
| 164 | case Bearer2G: | - |
| 165 | return QString::fromUtf8("" "2G" "", sizeof("2G") - 1); never executed: return QString::fromUtf8("" "2G" "", sizeof("2G") - 1); | 0 |
| 166 | case BearerCDMA2000: | - |
| 167 | return QString::fromUtf8("" "CDMA2000" "", sizeof("CDMA2000") - 1); never executed: return QString::fromUtf8("" "CDMA2000" "", sizeof("CDMA2000") - 1); | 0 |
| 168 | case BearerWCDMA: | - |
| 169 | return QString::fromUtf8("" "WCDMA" "", sizeof("WCDMA") - 1); never executed: return QString::fromUtf8("" "WCDMA" "", sizeof("WCDMA") - 1); | 0 |
| 170 | case BearerHSPA: | - |
| 171 | return QString::fromUtf8("" "HSPA" "", sizeof("HSPA") - 1); never executed: return QString::fromUtf8("" "HSPA" "", sizeof("HSPA") - 1); | 0 |
| 172 | case BearerBluetooth: | - |
| 173 | return QString::fromUtf8("" "Bluetooth" "", sizeof("Bluetooth") - 1); never executed: return QString::fromUtf8("" "Bluetooth" "", sizeof("Bluetooth") - 1); | 0 |
| 174 | case BearerWiMAX: | - |
| 175 | return QString::fromUtf8("" "WiMAX" "", sizeof("WiMAX") - 1); never executed: return QString::fromUtf8("" "WiMAX" "", sizeof("WiMAX") - 1); | 0 |
| 176 | case BearerUnknown: | - |
| 177 | break; | 0 |
| 178 | } | - |
| 179 | return QString::fromUtf8("" "Unknown" "", sizeof("Unknown") - 1); never executed: return QString::fromUtf8("" "Unknown" "", sizeof("Unknown") - 1); | 0 |
| 180 | } | - |
| 181 | | - |
| 182 | | - |
| 183 | | - |
| | |