MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / themeManagerSwitch

Method themeManagerSwitch

tests/test_theme.cpp:107–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 }
106
107 void themeManagerSwitch() {
108 auto& tm = ThemeManager::instance();
109 QSignalSpy spy(&tm, &ThemeManager::themeChanged);
110
111 int startIdx = tm.currentIndex();
112 int target = (startIdx == 0) ? 1 : 0;
113 tm.setCurrent(target);
114
115 QCOMPARE(spy.count(), 1);
116 QCOMPARE(tm.currentIndex(), target);
117 QCOMPARE(tm.current().name, tm.themes()[target].name);
118
119 // Restore
120 tm.setCurrent(startIdx);
121 }
122
123 void themeManagerCRUD() {
124 auto& tm = ThemeManager::instance();

Callers

nothing calls this directly

Calls 3

currentIndexMethod · 0.80
setCurrentMethod · 0.80
themesMethod · 0.80

Tested by

no test coverage detected