┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dolphinviewcontainer.cpp10
1 files changed, 10 insertions, 0 deletions
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 <QRegularExpression>
#include <QTimer>
#include <QUrl>
+#include <QUrlQuery>
// 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");