From df5cf6fe851021a73159fdd3487fe629c1ea8376 Mon Sep 17 00:00:00 2001 From: Felix Ernst Date: Wed, 11 Jan 2023 16:11:36 +0100 Subject: [PATCH] Adapt autotest to new expected "Space" key behaviour 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp index 4149a4d85..6fb1b72f9 100644 --- a/src/tests/kitemlistcontrollertest.cpp +++ b/src/tests/kitemlistcontrollertest.cpp @@ -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))