┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2019-10-02 23:03:27 +0200
committerElvis Angelaccio <[email protected]>2019-10-02 23:03:27 +0200
commit43ea7052e15b1cb917bcc6cd2bd3a8046179e45c (patch)
tree7960dfcc676a92e062db1eb336412ac42856c842 /src
parent557fcfa937132c1d4aa55faa04bb47848c368baa (diff)
parentb3120cb90e3d1dd5f4eef13e93378ccb1d01d098 (diff)
Merge branch 'Applications/19.08'
Diffstat (limited to 'src')
-rw-r--r--src/dolphinviewcontainer.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index dcec1db09..98b812497 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
@@ -676,11 +673,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.