]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix viewpropertiestest when GlobalViewProps is true
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sat, 3 Dec 2016 17:04:24 +0000 (18:04 +0100)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sat, 3 Dec 2016 17:04:24 +0000 (18:04 +0100)
The test was not saving its changes to the global settings, so it was
passing on the CI only because the default value of GlobalViewProps is
already false. If GlobalViewProps was set to true instead, testAutoSave()
would fail because save() was not called and GlobalViewProps was not

src/tests/viewpropertiestest.cpp

index 482e4127d7c78d71a7ae7f508e5535427817eb1b..114afdc33c9082830cc545eb7ee27f01125e7157 100644 (file)
@@ -44,6 +44,7 @@ void ViewPropertiesTest::init()
 {
     m_globalViewProps = GeneralSettings::self()->globalViewProps();
     GeneralSettings::self()->setGlobalViewProps(false);
+    GeneralSettings::self()->save();
 
     // It is mandatory to create the test-directory inside the home-directory
     // of the user: ViewProperties does not write inside directories
@@ -58,6 +59,7 @@ void ViewPropertiesTest::cleanup()
     m_testDir = 0;
 
     GeneralSettings::self()->setGlobalViewProps(m_globalViewProps);
+    GeneralSettings::self()->save();
 }
 
 /**