Review Request 113071: Make it possible to search for files whose name contains a space with the keyboard search
Frank Reininghaus
frank78ac at googlemail.com
Mon Oct 7 08:14:02 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/113071/
-----------------------------------------------------------
(Updated Oct. 7, 2013, 7:14 a.m.)
Status
------
This change has been marked as submitted.
Review request for Dolphin.
Bugs: 324479
http://bugs.kde.org/show_bug.cgi?id=324479
Repository: kde-baseapps
Description
-------
The user can jump quickly to files by entering the first few characters of the file name. However, we only add pressed keys to the search string if they have no other meaning. This means that files containing a Space in their name can currently not be searched because Ctrl+Space toggles the selection state of the current item, and Space alone selects the current item.
I propose to add Space to the search string if
(a) the key press did not have any other effect, i.e., if Ctrl was not pressed, and the current item is selected already, and
(b) a keyboard search has been started already (to prevent unexpected effects when pressing Space accidentally - I think that it's rather uncommon to have files whose names start with a Space - and to make the unit test simpler).
I modified the unit test of KItemListController, which did not test keyboard search yet. This uncovered a small problem in KItemListController::slotChangeCurrentItem() when NoSelection mode is used. It's not really relevant for anything that is executed inside Dolphin, but I still fixed it to make the unit test happy.
Diffs
-----
dolphin/src/kitemviews/kitemlistcontroller.cpp 4629b29
dolphin/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp 3815486
dolphin/src/tests/kitemlistcontrollertest.cpp d8f8388
Diff: http://git.reviewboard.kde.org/r/113071/diff/
Testing
-------
I can search for files with a Space in the name now. Old and new unit tests pass, and I haven't seen any regressions so far.
Thanks,
Frank Reininghaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20131007/58ccb84e/attachment.htm>
More information about the kfm-devel
mailing list