| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | void QAbstractConcatenable::convertFromAscii(const char *a, int len, QChar *&out) | - |
| 4 | { | - |
| 5 | if (len == -1) { evaluated: len == -1| yes Evaluation Count:8 | yes Evaluation Count:274 |
| 8-274 |
| 6 | if (!a) evaluated: !a| yes Evaluation Count:4 | yes Evaluation Count:4 |
| 4 |
| 7 | return; executed: return;Execution Count:4 | 4 |
| 8 | while (*a && uchar(*a) < 0x80U) evaluated: *a| yes Evaluation Count:4 | yes Evaluation Count:3 |
evaluated: uchar(*a) < 0x80U| yes Evaluation Count:3 | yes Evaluation Count:1 |
| 1-4 |
| 9 | *out++ = QLatin1Char(*a++); executed: *out++ = QLatin1Char(*a++);Execution Count:3 | 3 |
| 10 | if (!*a) evaluated: !*a| yes Evaluation Count:3 | yes Evaluation Count:1 |
| 1-3 |
| 11 | return; executed: return;Execution Count:3 | 3 |
| 12 | } else { executed: }Execution Count:1 | 1 |
| 13 | int i; | - |
| 14 | for (i = 0; i < len && uchar(a[i]) < 0x80U; ++i) evaluated: i < len| yes Evaluation Count:1388 | yes Evaluation Count:258 |
evaluated: uchar(a[i]) < 0x80U| yes Evaluation Count:1372 | yes Evaluation Count:16 |
| 16-1388 |
| 15 | *out++ = QLatin1Char(a[i]); executed: *out++ = QLatin1Char(a[i]);Execution Count:1372 | 1372 |
| 16 | if (i == len) evaluated: i == len| yes Evaluation Count:258 | yes Evaluation Count:16 |
| 16-258 |
| 17 | return; executed: return;Execution Count:258 | 258 |
| 18 | a += i; | - |
| 19 | len -= i; | - |
| 20 | } executed: }Execution Count:16 | 16 |
| 21 | | - |
| 22 | | - |
| 23 | QString tmp = QString::fromUtf8(a, len); | - |
| 24 | memcpy(out, reinterpret_cast<const char *>(tmp.constData()), sizeof(QChar) * tmp.size()); | - |
| 25 | out += tmp.size(); | - |
| 26 | } executed: }Execution Count:17 | 17 |
| 27 | | - |
| 28 | | - |
| 29 | | - |
| | |