diff options
| author | Shlomi Fish <[email protected]> | 2020-04-18 10:30:02 -0600 |
|---|---|---|
| committer | Nate Graham <[email protected]> | 2020-04-18 10:37:01 -0600 |
| commit | 196f4553e68a89d0162685f2df9a32a58e3ff479 (patch) | |
| tree | 0228415d2a84389eae2fcaa25096d02d7c96d699 /src/search | |
| parent | ec2c69726a89daea1348efbd0e1c6e92145f1773 (diff) | |
Move from the searchbox to the results with the down arrow key
Summary:
Move from the searchbox to the search results listbox/view using the
down arrow key in addition to the existing methods using the tab key,
return key, or the mouse.
Test Plan:
use ctrl+f to search in a directory tree, press down arrow key
to go to the results
Reviewers: ngraham, #dolphin
Reviewed By: ngraham, #dolphin
Subscribers: meven, elvisangelaccio, ngraham, iasensio, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D26362
Diffstat (limited to 'src/search')
| -rw-r--r-- | src/search/dolphinsearchbox.cpp | 5 | ||||
| -rw-r--r-- | src/search/dolphinsearchbox.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 23f520de1..22941104c 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -219,6 +219,9 @@ void DolphinSearchBox::keyReleaseEvent(QKeyEvent* event) m_searchInput->clear(); } } + else if (event->key() == Qt::Key_Down) { + emit focusViewRequest(); + } } bool DolphinSearchBox::eventFilter(QObject* obj, QEvent* event) @@ -283,7 +286,7 @@ void DolphinSearchBox::slotSearchTextChanged(const QString& text) void DolphinSearchBox::slotReturnPressed() { emitSearchRequest(); - emit returnPressed(); + emit focusViewRequest(); } void DolphinSearchBox::slotFacetChanged() diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h index 5fef4ec5a..2bf3ce4b1 100644 --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -118,8 +118,6 @@ signals: */ void searchTextChanged(const QString& text); - void returnPressed(); - /** * Emitted as soon as the search box should get closed. */ @@ -131,6 +129,7 @@ signals: * @see DolphinSearchBox::setActive() */ void activated(); + void focusViewRequest(); private slots: void emitSearchRequest(); |
