-/***************************************************************************
- * Copyright (C) 2012 by Frank Reininghaus <frank78ac@googlemail.com> *
- * *
- * 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 <frank78ac@googlemail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
#include "kitemviews/kitemlistcontainer.h"
#include "kitemviews/kfileitemlistview.h"
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.
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<QPair<KeyPress, ViewState> > testList;
// First, key presses which should have the same effect
<< qMakePair(KeyPress(Qt::Key_E), ViewState(13, KItemSet() << 13))
<< qMakePair(KeyPress(Qt::Key_Space), ViewState(14, KItemSet() << 14))
<< qMakePair(KeyPress(Qt::Key_3), ViewState(15, KItemSet() << 15))
+ << qMakePair(KeyPress(Qt::Key_Escape), ViewState(15, KItemSet()))
+ << qMakePair(KeyPress(Qt::Key_E), ViewState(13, KItemSet() << 13))
+ << qMakePair(KeyPress(Qt::Key_E), ViewState(14, KItemSet() << 14))
+ << qMakePair(KeyPress(Qt::Key_E), ViewState(15, KItemSet() << 15))
+ << qMakePair(KeyPress(Qt::Key_Escape), ViewState(15, KItemSet()))
+ << qMakePair(KeyPress(Qt::Key_E), ViewState(13, KItemSet() << 13))
<< qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0))
<< qMakePair(KeyPress(Qt::Key_Escape), ViewState(0, KItemSet()));