diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-24 17:38:52 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-24 17:38:52 +0200 |
| commit | cfd96a07b5b14abe1585f0edf68cd0b9c8975463 (patch) | |
| tree | 2e8c613af723f5b3a60e9a345ac29c85ea06f837 /src/repeatrule.h | |
| parent | 516b2daaeab00bb4d4c28055a434dc5ee53aeb60 (diff) | |
| download | qtmaildir-cfd96a07b5b14abe1585f0edf68cd0b9c8975463.tar.gz qtmaildir-cfd96a07b5b14abe1585f0edf68cd0b9c8975463.zip | |
docs: document the calendar, translate it, file its follow-ups
Give RepeatRule its own Q_DECLARE_TR_FUNCTIONS context so lupdate extracts
describe() and the ordinal words, mirroring the array's QT_TRANSLATE_NOOP;
without it lupdate warned and RepeatRule/last was never extractable.
Diffstat (limited to 'src/repeatrule.h')
| -rw-r--r-- | src/repeatrule.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/repeatrule.h b/src/repeatrule.h index 59dfceb..f686197 100644 --- a/src/repeatrule.h +++ b/src/repeatrule.h @@ -18,6 +18,7 @@ #pragma once +#include <QCoreApplication> #include <QDate> #include <QList> #include <QString> @@ -29,6 +30,13 @@ /// is what lets every row of the spec's repeat table be tested as a string. struct RepeatRule { + // describe() formats the rule in words, and lupdate needs the class's own + // context to extract them (AGENTS.md: a class needs this macro, an array + // needs QT_TRANSLATE_NOOP on the literal). The macro ends in a private: + // section, so the explicit public: restores the fields below. + Q_DECLARE_TR_FUNCTIONS(RepeatRule) +public: + enum class Freq { None, Daily, Weekly, Monthly, Yearly }; /// Monthly and Yearly only: on a day of the month, or on the Nth weekday. enum class By { MonthDay, Weekday }; |
