feat: dual time zones, autostart, tray icon, config relocation, tests

- Dual clock (primary/secondary time zone) with IANA picker, persisted in XML
- AutoStartManager: macOS LaunchAgent (com.clouck.clock, RunAtLoad)
- Tray icon: template image, light/dark adaptation, toggle + quit menu
- ConfigManager: default path moved to QStandardPaths::AppConfigLocation
- Qt Test suite (ConfigManager, AutoStartManager) wired into CTest
- GitHub origin renamed to upstream; private Gitea repo as origin
This commit is contained in:
2026-08-19 21:09:06 +03:00
parent e59a674ba7
commit 6b9cb32534
12 changed files with 448 additions and 20 deletions
+26
View File
@@ -0,0 +1,26 @@
#include "autostart_manager.h"
#include <QtTest>
class AutoStartManagerTest : public QObject
{
Q_OBJECT
private slots:
void createsRunAtLoadLaunchAgent();
};
void AutoStartManagerTest::createsRunAtLoadLaunchAgent()
{
const QString executablePath = "/Applications/Clouck.app/Contents/MacOS/Clouck";
const QString contents = AutoStartManager::launchAgentContents(executablePath);
QVERIFY(contents.contains("<key>ProgramArguments</key>"));
QVERIFY(contents.contains(executablePath));
QVERIFY(contents.contains("<key>RunAtLoad</key>"));
QVERIFY(contents.contains("<true/>"));
}
QTEST_APPLESS_MAIN(AutoStartManagerTest)
#include "autostart_manager_test.moc"