X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/ed2d352c42a6d517d4f29b3582c0e00aa34fe647..9df6ef77aadbd2c142bc666d3c998d9ece47f7fe:/src/dolphinrecenttabsmenu.cpp diff --git a/src/dolphinrecenttabsmenu.cpp b/src/dolphinrecenttabsmenu.cpp index 6a647c177..d9b103c0c 100644 --- a/src/dolphinrecenttabsmenu.cpp +++ b/src/dolphinrecenttabsmenu.cpp @@ -5,12 +5,14 @@ */ #include "dolphinrecenttabsmenu.h" +#include "search/dolphinquery.h" #include #include #include #include +#include DolphinRecentTabsMenu::DolphinRecentTabsMenu(QObject *parent) : KActionMenu(QIcon::fromTheme(QStringLiteral("edit-undo")), i18n("Recently Closed Tabs"), parent) @@ -30,7 +32,11 @@ DolphinRecentTabsMenu::DolphinRecentTabsMenu(QObject *parent) void DolphinRecentTabsMenu::rememberClosedTab(const QUrl &url, const QByteArray &state) { QAction *action = new QAction(menu()); - action->setText(url.path()); + if (Search::isSupportedSearchScheme(url.scheme())) { + action->setText(Search::DolphinQuery{url, QUrl{}}.title()); + } else { + action->setText(url.path()); + } action->setData(state); const QString iconName = KIO::iconNameForUrl(url); action->setIcon(QIcon::fromTheme(iconName));