From 32a4d1dd40f8f1ab28ba3d57fba2a3dd661a8104 Mon Sep 17 00:00:00 2001 From: Méven Car Date: Sun, 15 Sep 2019 10:25:16 +0200 Subject: Bring back placesitemmodeltest KIO_VERSION is not defined, KF5_VERSION is. --- src/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index a0c9bbf38..44a413bd9 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -71,7 +71,7 @@ LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test) ecm_add_test(draganddrophelpertest.cpp LINK_LIBRARIES dolphinprivate Qt5::Test) # PlacesItemModelTest -if (KIO_VERSION VERSION_GREATER_EQUAL "5.60.0") +if (KF5_VERSION VERSION_GREATER_EQUAL "5.60.0") ecm_add_test(placesitemmodeltest.cpp TEST_NAME placesitemmodeltest LINK_LIBRARIES dolphinprivate dolphinstatic Qt5::Test) -- cgit v1.3 From b3120cb90e3d1dd5f4eef13e93378ccb1d01d098 Mon Sep 17 00:00:00 2001 From: Ismael Asensio Date: Wed, 2 Oct 2019 22:57:32 +0200 Subject: Update searchbar parameters on URL change Summary: Searchbar options (text and options) were only updated when toggling the search on, $ Main use case is when changing between stored search urls in Places panel. Test Plan: - Store two search urls in Places panel - Navigate between them - The searchbar text and parameters change accordingly BEFORE: {F7500811} AFTER: {F7500813} Reviewers: #dolphin, elvisangelaccio Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24369 --- src/dolphinviewcontainer.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 6a8ff914b..8e821d8aa 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -396,10 +396,7 @@ void DolphinViewContainer::setSearchModeEnabled(bool enabled) m_searchBox->setVisible(enabled); m_navigatorWidget->setVisible(!enabled); - if (enabled) { - const QUrl& locationUrl = m_urlNavigator->locationUrl(); - m_searchBox->fromSearchUrl(locationUrl); - } else { + if (!enabled) { m_view->setViewPropertiesContext(QString()); // Restore the URL for the URL navigator. If Dolphin has been @@ -674,11 +671,15 @@ void DolphinViewContainer::slotUrlNavigatorLocationChanged(const QUrl& url) slotReturnPressed(); if (KProtocolManager::supportsListing(url)) { - setSearchModeEnabled(isSearchUrl(url)); + const bool searchUrl = isSearchUrl(url); + if (searchUrl) { + m_searchBox->fromSearchUrl(url); + } + setSearchModeEnabled(searchUrl); m_view->setUrl(url); tryRestoreViewState(); - if (m_autoGrabFocus && isActive() && !isSearchUrl(url)) { + if (m_autoGrabFocus && isActive() && !searchUrl) { // When an URL has been entered, the view should get the focus. // The focus must be requested asynchronously, as changing the URL might create // a new view widget. -- cgit v1.3