┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests/kitemlistcontrollertest.cpp
diff options
context:
space:
mode:
authorAlexander Lohnau <[email protected]>2020-10-23 19:48:22 +0200
committerElvis Angelaccio <[email protected]>2020-10-23 18:23:06 +0000
commita24327cd50ef17b953ecb908d260b73460158107 (patch)
treeb0fdaf2b2ab6cc4df0d471b3f1e9f449be71aa33 /src/tests/kitemlistcontrollertest.cpp
parent360a8dd883f7e281c0a3f2ae729450790399bf3d (diff)
Compile without foreach
Diffstat (limited to 'src/tests/kitemlistcontrollertest.cpp')
-rw-r--r--src/tests/kitemlistcontrollertest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp
index 7bc6b5d99..80b88c03e 100644
--- a/src/tests/kitemlistcontrollertest.cpp
+++ b/src/tests/kitemlistcontrollertest.cpp
@@ -241,7 +241,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 +279,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<QPair<KeyPress, ViewState> > testList;
// First, key presses which should have the same effect