┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2023-01-11 16:11:36 +0100
committerFelix Ernst <[email protected]>2023-01-11 16:11:36 +0100
commitdf5cf6fe851021a73159fdd3487fe629c1ea8376 (patch)
tree1253bc70ad827155accbb06e62fdb2af1d7a688f /src
parent44c82a16b3e2fc2d40601fd70f8253dce40dda86 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/tests/kitemlistcontrollertest.cpp3
1 files changed, 2 insertions, 1 deletions
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))