mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Fix window / tab caption in search mode
A search URL is never local, so this part of the code was never reached, resulting in raw baloosearch or filenamesearch URLs showing up as window and tab title Differential Revision: https://phabricator.kde.org/D15772
This commit is contained in:
parent
a9d10a5c0b
commit
0483b8a77f
|
@ -425,6 +425,15 @@ QString DolphinViewContainer::caption() const
|
|||
if (!matchedPlaces.isEmpty()) {
|
||||
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);
|
||||
QString caption;
|
||||
|
@ -445,14 +454,6 @@ QString DolphinViewContainer::caption() const
|
|||
fileName = '/';
|
||||
}
|
||||
|
||||
if (isSearchModeEnabled()) {
|
||||
if(currentSearchText().isEmpty()){
|
||||
return i18n("Search");
|
||||
} else {
|
||||
return i18n("Search for %1", currentSearchText());
|
||||
}
|
||||
}
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue