]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/kitemlistcontrollertest.cpp
Compile without foreach
[dolphin.git] / src / tests / kitemlistcontrollertest.cpp
index 7bc6b5d99d4f90d4ef4517f549250a8b7b71f0aa..80b88c03eea90e3a79f3fdefc18a381984beacd8 100644 (file)
@@ -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