Changeset View
Changeset View
Standalone View
Standalone View
tests/configsavetest.cpp
Show All 10 Lines | |||||
11 | 11 | | |||
12 | ConfigSaveTest::ConfigSaveTest() | 12 | ConfigSaveTest::ConfigSaveTest() | ||
13 | { | 13 | { | ||
14 | QStandardPaths::setTestModeEnabled(true); | 14 | QStandardPaths::setTestModeEnabled(true); | ||
15 | } | 15 | } | ||
16 | 16 | | |||
17 | static void fillValues(QScopedPointer<AbstractAppearance>& a) | 17 | static void fillValues(QScopedPointer<AbstractAppearance>& a) | ||
18 | { | 18 | { | ||
19 | a->setFont("a"); | | |||
20 | a->setIcon("a"); | 19 | a->setIcon("a"); | ||
21 | a->setTheme("a"); | 20 | a->setTheme("a"); | ||
22 | a->setToolbarStyle("a"); | 21 | a->setToolbarStyle("a"); | ||
23 | a->setIconFallback("a"); | 22 | a->setIconFallback("a"); | ||
24 | a->setCursor("a"); | 23 | a->setCursor("a"); | ||
25 | a->setShowIconsInButtons(true); | 24 | a->setShowIconsInButtons(true); | ||
26 | a->setShowIconsInMenus(true); | 25 | a->setShowIconsInMenus(true); | ||
27 | a->setPrimaryButtonWarpsSlider(true); | 26 | a->setPrimaryButtonWarpsSlider(true); | ||
28 | 27 | | |||
29 | auto a3 = dynamic_cast<AppearanceGTK3*>(a.data()); | 28 | auto a3 = dynamic_cast<AppearanceGTK3*>(a.data()); | ||
30 | if (a3) { | 29 | if (a3) { | ||
31 | a3->setApplicationPreferDarkTheme(false); | 30 | a3->setApplicationPreferDarkTheme(false); | ||
32 | } | 31 | } | ||
33 | } | 32 | } | ||
34 | 33 | | |||
35 | void compareAppearances(QScopedPointer<AbstractAppearance>& reloaded, QScopedPointer<AbstractAppearance>& instance) | 34 | void compareAppearances(QScopedPointer<AbstractAppearance>& reloaded, QScopedPointer<AbstractAppearance>& instance) | ||
36 | { | 35 | { | ||
37 | QCOMPARE(reloaded->getFont(), instance->getFont()); | | |||
38 | QCOMPARE(reloaded->getIcon(), instance->getIcon()); | 36 | QCOMPARE(reloaded->getIcon(), instance->getIcon()); | ||
39 | QCOMPARE(reloaded->getTheme(), instance->getTheme()); | 37 | QCOMPARE(reloaded->getTheme(), instance->getTheme()); | ||
40 | QCOMPARE(reloaded->getCursor(), instance->getCursor()); | 38 | QCOMPARE(reloaded->getCursor(), instance->getCursor()); | ||
41 | QCOMPARE(reloaded->getToolbarStyle(), instance->getToolbarStyle()); | 39 | QCOMPARE(reloaded->getToolbarStyle(), instance->getToolbarStyle()); | ||
42 | QCOMPARE(reloaded->getIconFallback(), instance->getIconFallback()); | 40 | QCOMPARE(reloaded->getIconFallback(), instance->getIconFallback()); | ||
43 | QCOMPARE(reloaded->getShowIconsInButtons(), instance->getShowIconsInButtons()); | 41 | QCOMPARE(reloaded->getShowIconsInButtons(), instance->getShowIconsInButtons()); | ||
44 | QCOMPARE(reloaded->getShowIconsInMenus(), instance->getShowIconsInMenus()); | 42 | QCOMPARE(reloaded->getShowIconsInMenus(), instance->getShowIconsInMenus()); | ||
45 | QCOMPARE(reloaded->getPrimaryButtonWarpsSlider(), instance->getPrimaryButtonWarpsSlider()); | 43 | QCOMPARE(reloaded->getPrimaryButtonWarpsSlider(), instance->getPrimaryButtonWarpsSlider()); | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |