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: 100.0% 4 / 0 / 4
Functions: 100.0% 4 / 0 / 4
Branches: -% 0 / 0 / 0

presentation/UiStateStore.h
Line Branch Exec Source
1 #pragma once
2 #include <QString>
3 #include <QVariantMap>
4 #include <QJsonObject>
5
6 // Local-only UI preferences and session persistence. No database or sync access.
7 // A host supplies its own profile directory; tests never use the user's profile.
8 class UiStateStore {
9 public:
10 explicit UiStateStore(QString directory);
11 static constexpr qint64 MaximumFileBytes = 1024 * 1024;
12 776 const QString &directory() const { return m_directory; }
13 static QVariantMap defaults();
14 2326 QVariantMap preferences() const { return m_preferences; }
15 3 QString error() const { return m_error; }
16 bool load(const QString &legacyIniPath = {});
17 bool savePreferences(const QVariantMap &preferences);
18 bool readSession(QJsonObject *session);
19 bool saveSession(const QJsonObject &session);
20 4 bool writable() const { return m_writable; }
21 private:
22 bool writeJson(const QString &name, const QJsonObject &object);
23 bool readBytes(const QString &name, QByteArray *bytes);
24 static QVariantMap normalized(const QVariantMap &values);
25 QString m_directory;
26 QString m_error;
27 QVariantMap m_preferences = defaults();
28 bool m_writable = false;
29 };
30