diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 0681c67d9..60d3374ad 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -119,7 +119,7 @@ DolphinViewContainer::DolphinViewContainer(const QUrl& url, QWidget* parent) : connect(m_searchBox, &DolphinSearchBox::activated, this, &DolphinViewContainer::activate); connect(m_searchBox, &DolphinSearchBox::closeRequest, this, &DolphinViewContainer::closeSearchBox); connect(m_searchBox, &DolphinSearchBox::searchRequest, this, &DolphinViewContainer::startSearching); - connect(m_searchBox, &DolphinSearchBox::returnPressed, this, &DolphinViewContainer::requestFocus); + connect(m_searchBox, &DolphinSearchBox::focusViewRequest, this, &DolphinViewContainer::requestFocus); m_searchBox->setWhatsThis(xi18nc("@info:whatsthis findbar", "This helps you find files and folders. Enter a " "search term and specify search settings with the " 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();