X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d575e1e88409d819fb92456e8022e8e0322549af..f3a86bf29e9165bbe2861c0af5e537d6d6f80854:/src/tests/placesitemmodeltest.cpp diff --git a/src/tests/placesitemmodeltest.cpp b/src/tests/placesitemmodeltest.cpp index 40ee47cbc..4ed4945b2 100644 --- a/src/tests/placesitemmodeltest.cpp +++ b/src/tests/placesitemmodeltest.cpp @@ -29,6 +29,7 @@ #include #include +#include "dolphin_generalsettings.h" #include "panels/places/placesitemmodel.h" #include "panels/places/placesitem.h" #include "views/viewproperties.h" @@ -475,10 +476,20 @@ void PlacesItemModelTest::testDefaultViewProperties() QFETCH(bool, expectedPreviewShow); QFETCH(QList, expectedVisibleRole); + // In order to test the default view properties, turn off the global view properties and re-init the test to reload the model. + GeneralSettings* settings = GeneralSettings::self(); + settings->setGlobalViewProps(false); + settings->save(); + cleanup(); + init(); + ViewProperties properties(KFilePlacesModel::convertedUrl(url)); QCOMPARE(properties.viewMode(), expectedViewMode); QCOMPARE(properties.previewsShown(), expectedPreviewShow); QCOMPARE(properties.visibleRoles(), expectedVisibleRole); + + settings->setGlobalViewProps(true); + settings->save(); } void PlacesItemModelTest::testClear()