Commit 29f8c881 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Recent Documents Runner: Strip trailing slash in subtext

Show a nicer "~/Documents" instead of "~/Documents/" and consistent with
what the Baloo Runner does


(cherry picked from commit 2370b662)
parent 184cc5c3
...@@ -98,7 +98,7 @@ void RecentDocuments::match(Plasma::RunnerContext &context) ...@@ -98,7 +98,7 @@ void RecentDocuments::match(Plasma::RunnerContext &context)
match.setData(QVariant(url)); match.setData(QVariant(url));
match.setText(name); match.setText(name);
QString destUrlString = KShell::tildeCollapse(url.adjusted(QUrl::RemoveFilename).path()); QString destUrlString = KShell::tildeCollapse(url.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash).path());
match.setSubtext(destUrlString); match.setSubtext(destUrlString);
context.addMatch(match); context.addMatch(match);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment