X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/6e6fcf8da80b5b6821837054ae51eaa19edc24b8..5ce591f6c455bd91e4be4fbfed3939de20156e96:/src/dolphinviewcontainer.cpp diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 3fedef6fc..f0035a857 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -41,6 +41,7 @@ #include #include #include +#include // An overview of the widgets contained by this ViewContainer struct LayoutStructure { @@ -533,6 +534,15 @@ QString DolphinViewContainer::captionWindowTitle() const QString DolphinViewContainer::caption() const { + // see KUrlNavigatorPrivate::firstButtonText(). + if (url().path().isEmpty() || url().path() == QLatin1Char('/')) { + QUrlQuery query(url()); + const QString title = query.queryItemValue(QStringLiteral("title")); + if (!title.isEmpty()) { + return title; + } + } + if (isSearchModeEnabled()) { if (currentSearchText().isEmpty()) { return i18n("Search");