X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5360bc3ab328c8b1161b0c5df9c5785829a3e880..ffb80cb00d8fd886051f970b5155a55b1d066fcd:/src/tests/kitemlistcontrollertest.cpp diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp index 7bc6b5d99..4149a4d85 100644 --- a/src/tests/kitemlistcontrollertest.cpp +++ b/src/tests/kitemlistcontrollertest.cpp @@ -16,6 +16,7 @@ #include #include #include +#include /** * \class KItemListControllerTestStyle is a proxy style for testing the @@ -68,7 +69,7 @@ class KItemListControllerTest : public QObject { Q_OBJECT -private slots: +private Q_SLOTS: void initTestCase(); void cleanupTestCase(); @@ -103,6 +104,7 @@ private: */ void KItemListControllerTest::initTestCase() { + QStandardPaths::setTestModeEnabled(true); qRegisterMetaType("KItemSet"); m_testDir = new TestDir(); @@ -241,7 +243,7 @@ void KItemListControllerTest::testKeyboardNavigation_data() groupingEnabledList.append(true); groupingEnabledNames[true] = "grouping enabled"; - foreach (const KFileItemListView::ItemLayout& layout, layoutList) { + for (const KFileItemListView::ItemLayout& layout : layoutList) { // The following settings depend on the layout. // Note that 'columns' are actually 'rows' in // Compact layout. @@ -279,9 +281,9 @@ void KItemListControllerTest::testKeyboardNavigation_data() break; } - foreach (int columnCount, columnCountList) { - foreach (const KItemListController::SelectionBehavior& selectionBehavior, selectionBehaviorList) { - foreach (bool groupingEnabled, groupingEnabledList) { // krazy:exclude=foreach + for (int columnCount : qAsConst(columnCountList)) { + for (const KItemListController::SelectionBehavior& selectionBehavior : qAsConst(selectionBehaviorList)) { + for (bool groupingEnabled : qAsConst(groupingEnabledList)) { QList > testList; // First, key presses which should have the same effect