X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a5ce798f282b6cf9e153bba89f9caea0cec37da0..d3839617:/src/tests/kitemlistcontrollertest.cpp diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp index 4cb1256e3..4149a4d85 100644 --- a/src/tests/kitemlistcontrollertest.cpp +++ b/src/tests/kitemlistcontrollertest.cpp @@ -1,21 +1,8 @@ -/*************************************************************************** - * Copyright (C) 2012 by Frank Reininghaus * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ +/* + * SPDX-FileCopyrightText: 2012 Frank Reininghaus + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "kitemviews/kitemlistcontainer.h" #include "kitemviews/kfileitemlistview.h" @@ -29,6 +16,7 @@ #include #include #include +#include /** * \class KItemListControllerTestStyle is a proxy style for testing the @@ -81,7 +69,7 @@ class KItemListControllerTest : public QObject { Q_OBJECT -private slots: +private Q_SLOTS: void initTestCase(); void cleanupTestCase(); @@ -116,6 +104,7 @@ private: */ void KItemListControllerTest::initTestCase() { + QStandardPaths::setTestModeEnabled(true); qRegisterMetaType("KItemSet"); m_testDir = new TestDir(); @@ -254,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. @@ -292,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