From 2e6798088b1a07422a670f419475f8109b043fdc Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Sun, 3 Jun 2018 11:24:20 +0200 Subject: [PATCH] Enable test mode in dolphinmainwindowtest We don't want to use the user configuration files when creating a test instance of DolphinMainWindow. --- src/tests/dolphinmainwindowtest.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tests/dolphinmainwindowtest.cpp b/src/tests/dolphinmainwindowtest.cpp index 70ec8dba04..eee3871167 100644 --- a/src/tests/dolphinmainwindowtest.cpp +++ b/src/tests/dolphinmainwindowtest.cpp @@ -25,6 +25,7 @@ #include #include +#include #include class DolphinMainWindowTest : public QObject @@ -32,6 +33,7 @@ class DolphinMainWindowTest : public QObject Q_OBJECT private slots: + void initTestCase(); void init(); void testClosingTabsWithSearchBoxVisible(); void testActiveViewAfterClosingSplitView_data(); @@ -42,6 +44,11 @@ private: QScopedPointer m_mainWindow; }; +void DolphinMainWindowTest::initTestCase() +{ + QStandardPaths::setTestModeEnabled(true); +} + void DolphinMainWindowTest::init() { m_mainWindow.reset(new DolphinMainWindow());