]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/dolphinmainwindowtest.cpp
Fix build for KIO version < 6.14
[dolphin.git] / src / tests / dolphinmainwindowtest.cpp
index d7cb763fd8f6658f79bc9e8efe42b666df6c08a2..4ae36e7e6b6d6c110528b6f76ae0a9338284c9a1 100644 (file)
@@ -9,6 +9,7 @@
 #include "dolphintabpage.h"
 #include "dolphintabwidget.h"
 #include "dolphinviewcontainer.h"
+#include "dolphin_generalsettings.h"
 #include "kitemviews/kfileitemmodel.h"
 #include "kitemviews/kfileitemmodelrolesupdater.h"
 #include "kitemviews/kitemlistcontainer.h"
@@ -75,6 +76,11 @@ private:
 void DolphinMainWindowTest::initTestCase()
 {
     QStandardPaths::setTestModeEnabled(true);
+    // Use fullWidth statusbar during testing, to test out most of the features.
+    GeneralSettings *settings = GeneralSettings::self();
+    settings->setShowStatusBar(GeneralSettings::EnumShowStatusBar::FullWidth);
+    settings->setShowZoomSlider(true);
+    settings->save();
 }
 
 void DolphinMainWindowTest::init()
@@ -198,7 +204,7 @@ void DolphinMainWindowTest::testClosingTabsWithSearchBoxVisible()
     QVERIFY(tabWidget);
 
     // Show search box on first tab.
-    tabWidget->currentTabPage()->activeViewContainer()->setSearchModeEnabled(true);
+    tabWidget->currentTabPage()->activeViewContainer()->setSearchBarVisible(true);
 
     tabWidget->openNewActivatedTab(QUrl::fromLocalFile(QDir::homePath()));
     QCOMPARE(tabWidget->count(), 2);