]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/kitemlistcontrollertest.cpp
Replace qAsConst with std::as_const
[dolphin.git] / src / tests / kitemlistcontrollertest.cpp
index a7842475a25e69476fa1e65d7952e969b9f30f15..ac2110c0fcd49b76cde6c894a30d1515e0afadd5 100644 (file)
@@ -292,9 +292,9 @@ void KItemListControllerTest::testKeyboardNavigation_data()
             break;
         }
 
-        for (int columnCount : qAsConst(columnCountList)) {
-            for (const KItemListController::SelectionBehavior &selectionBehavior : qAsConst(selectionBehaviorList)) {
-                for (bool groupingEnabled : qAsConst(groupingEnabledList)) {
+        for (int columnCount : std::as_const(columnCountList)) {
+            for (const KItemListController::SelectionBehavior &selectionBehavior : std::as_const(selectionBehaviorList)) {
+                for (bool groupingEnabled : std::as_const(groupingEnabledList)) {
                     QList<QPair<KeyPress, ViewState>> testList;
 
                     // First, key presses which should have the same effect
@@ -321,8 +321,7 @@ void KItemListControllerTest::testKeyboardNavigation_data()
                              << qMakePair(KeyPress(Qt::Key_Enter), ViewState(0, KItemSet(), true))
                              << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(0, KItemSet() << 0))
                              << qMakePair(KeyPress(Qt::Key_Space, Qt::ControlModifier), ViewState(0, KItemSet()))
-                             << qMakePair(KeyPress(Qt::Key_Space), ViewState(0, KItemSet())) // This used to select, but we are now using it to trigger either
-                             // selection mode or "QuickLook". Ctrl+Space still works for selecting as expected.
+                             << qMakePair(KeyPress(Qt::Key_Space), ViewState(0, KItemSet() << 0))
                              << 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))