]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Display readable titlebar text while using search and full paths in titlebar
authorAntonio Prcela <antonio.prcela@gmail.com>
Tue, 14 Apr 2020 15:12:04 +0000 (09:12 -0600)
committerNate Graham <nate@kde.org>
Tue, 14 Apr 2020 15:15:08 +0000 (09:15 -0600)
Summary:
BUG: 406624
FIXED-IN: 20.08

Reviewers: #vdg, #dolphin, iasensio, elvisangelaccio, ngraham, meven

Reviewed By: #vdg, #dolphin, ngraham, meven

Subscribers: meven, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D28815

src/dolphinviewcontainer.cpp

index bd3c8ed20f1d18f05ab15a61e8f86b2038f700b8..3a17805ab8916667d15752c942c699fdcccc1b24 100644 (file)
@@ -451,6 +451,14 @@ void DolphinViewContainer::reload()
 
 QString DolphinViewContainer::caption() const
 {
+    if (isSearchModeEnabled()) {
+        if (currentSearchText().isEmpty()){
+            return i18n("Search");
+        } else {
+            return i18n("Search for %1", currentSearchText());
+        }
+    }
+
     if (GeneralSettings::showFullPathInTitlebar()) {
         if (!url().isLocalFile()) {
             return url().adjusted(QUrl::StripTrailingSlash).toString();
@@ -465,13 +473,6 @@ QString DolphinViewContainer::caption() const
         return placesModel->text(matchedPlaces.first());
     }
 
-    if (isSearchModeEnabled()) {
-        if (currentSearchText().isEmpty()){
-            return i18n("Search");
-        } else {
-            return i18n("Search for %1", currentSearchText());
-        }
-    }
 
     if (!url().isLocalFile()) {
         QUrl adjustedUrl = url().adjusted(QUrl::StripTrailingSlash);