diff options
| author | Elvis Angelaccio <[email protected]> | 2019-05-05 15:54:12 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2019-05-05 15:54:12 +0200 |
| commit | 33a0d17ea8d4de81322ca51a5acc1356f37798ed (patch) | |
| tree | ae174ab70d5cb687f9ac86d90909f82560aa166e /src | |
| parent | 9f1b6eb3f4275bbc9fd6b00a4127291bc9f16caf (diff) | |
Try again to fix PlacesItemModelTest::testDefaultViewProperties()
Commit bff373d598c031cb1 was not enough because the model takes into
account the global view properties setting (in PlacesItemModel::initializeDefaultViewProperties()).
This means we need to disable the setting before init() runs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tests/placesitemmodeltest.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tests/placesitemmodeltest.cpp b/src/tests/placesitemmodeltest.cpp index fac0931a6..4ed4945b2 100644 --- a/src/tests/placesitemmodeltest.cpp +++ b/src/tests/placesitemmodeltest.cpp @@ -476,10 +476,12 @@ void PlacesItemModelTest::testDefaultViewProperties() QFETCH(bool, expectedPreviewShow); QFETCH(QList<QByteArray>, expectedVisibleRole); - // In order to test the default view properties, turn off the global view properties. + // 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); |
