MailJDTourDownloadDocsQualityTestsCoverage

Which source lines and branches the tests execute. Lines 91.5 %, branches 75.0 % (minimum 85 % and 72 %). main @ 399ffe3d · 21 October 2026 · pipeline 7238.

GCC Code Coverage Report


Directory: src/
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 90.9% 10 / 0 / 11
Functions: 100.0% 1 / 0 / 1
Branches: 100.0% 10 / 0 / 10

util/MenuText.h
Line Branch Exec Source
1 #pragma once
2 // S106-280: native QMenu/QAction labels treat '&' as a mnemonic marker and a
3 // tab as the start of the shortcut column. Labels that carry untrusted text
4 // (contact names, address-book and list names, senders, folders, labels)
5 // go through plain() so "AT&T" stays "AT&T". Header-only and pure; the
6 // QML fallback menus render their text verbatim and need no escaping.
7
8 #include <QString>
9
10 namespace MenuText {
11
12 // '&' doubled; tabs, line breaks and other control characters become spaces.
13 601 inline QString plain(const QString &text) {
14 601 QString result;
15
1/1
✓ Branch 3 → 4 taken 601 times.
601 result.reserve(text.size() + 4);
16
2/2
✓ Branch 25 → 6 taken 7553 times.
✓ Branch 25 → 26 taken 601 times.
8154 for (const QChar ch : text) {
17
2/2
✓ Branch 9 → 10 taken 3 times.
✓ Branch 9 → 17 taken 7550 times.
7553 if (ch == QLatin1Char('&'))
18
1/1
✓ Branch 13 → 14 taken 3 times.
3 result += QStringLiteral("&&");
19
2/2
✓ Branch 18 → 19 taken 2 times.
✓ Branch 18 → 23 taken 7548 times.
7550 else if (ch.category() == QChar::Other_Control)
20
1/1
✓ Branch 21 → 22 taken 2 times.
2 result += QLatin1Char(' ');
21 else
22
1/1
✓ Branch 23 → 24 taken 7548 times.
7548 result += ch;
23 }
24 601 return result;
25 ✗ }
26
27 } // namespace MenuText
28