X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/4102ccb80457eea44ea280f0ace2a419602bc34b..refs/heads/master:/src/search/dolphinquery.cpp diff --git a/src/search/dolphinquery.cpp b/src/search/dolphinquery.cpp index e23f1f08e..100bac4d0 100644 --- a/src/search/dolphinquery.cpp +++ b/src/search/dolphinquery.cpp @@ -16,6 +16,7 @@ #include #include +#include #include #include @@ -366,7 +367,11 @@ QString DolphinQuery::title() const prettySearchLocation = m_searchPath.fileName(); } if (prettySearchLocation.isEmpty()) { - prettySearchLocation = m_searchPath.toString(QUrl::RemoveAuthority); + if (m_searchPath.isLocalFile()) { + prettySearchLocation = KShell::tildeCollapse(m_searchPath.adjusted(QUrl::StripTrailingSlash).toLocalFile()); + } else { + prettySearchLocation = m_searchPath.toString(QUrl::RemoveAuthority | QUrl::StripTrailingSlash); + } } // A great title clearly identifies a search results page among many tabs, windows, or links in the Places panel.