]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Adapt autotest to new expected "Space" key behaviour
authorFelix Ernst <fe.a.ernst@gmail.com>
Wed, 11 Jan 2023 15:11:36 +0000 (16:11 +0100)
committerFelix Ernst <fe.a.ernst@gmail.com>
Wed, 11 Jan 2023 15:11:36 +0000 (16:11 +0100)
The old expected behaviour was that pressing Space would select
the current item. We now trigger selection mode instead and don't
select. At some point in the future we might want to instead have
Space trigger a "QuickLook" feature for quick viewing of full
files. In any case, the old behaviour of having Space select is
no longer expected, but Ctrl+Space can still be used for this.

It might also make sense to have Space trigger the old selection
behaviour if both selection mode and "QuickLook" are disabled, but
that is very low priority and will cause more code complexity than
the non-default benefits are worth.

src/tests/kitemlistcontrollertest.cpp

index 4149a4d85c1b4d7fbc794b120c9731d6e7045a26..6fb1b72f91bfae94dd419b87737d4fdec0925435 100644 (file)
@@ -311,7 +311,8 @@ 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() << 0))
+                        << 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_E), ViewState(13, KItemSet() << 13))
                         << qMakePair(KeyPress(Qt::Key_Space), ViewState(14, KItemSet() << 14))
                         << qMakePair(KeyPress(Qt::Key_3), ViewState(15, KItemSet() << 15))