#include <KAboutData>
#include <KFilePlacesModel>
+#include "dolphin_generalsettings.h"
#include "panels/places/placesitemmodel.h"
#include "panels/places/placesitem.h"
#include "views/viewproperties.h"
#define KDE_ROOT_PATH "/"
#endif
-namespace
-{
- constexpr int TIMEOUT = 10000;
-}
-
static QString bookmarksFile()
{
return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/user-places.xbel";
QFETCH(bool, expectedPreviewShow);
QFETCH(QList<QByteArray>, expectedVisibleRole);
+ // In order to test the default view properties, turn off the global view properties.
+ GeneralSettings* settings = GeneralSettings::self();
+ settings->setGlobalViewProps(false);
+ settings->save();
+
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()
m_model->refresh();
// item must be equal
- QTRY_COMPARE_WITH_TIMEOUT(item->text(), sameItem->text(), TIMEOUT);
+ QTRY_COMPARE(item->text(), sameItem->text());
}
void PlacesItemModelTest::testIcons_data()