Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
b31aea19
Commit
b31aea19
authored
Dec 31, 2020
by
Kai Uwe Broulik
🍇
Browse files
Baloo Runner: Use KShell::tildeCollapse
Rather than doing it manually
parent
2370b662
Changes
1
Hide whitespace changes
Inline
Side-by-side
runners/baloo/baloosearchrunner.cpp
View file @
b31aea19
...
...
@@ -184,9 +184,7 @@ RemoteMatches SearchRunner::matchInternal(const QString& searchTerm, const QStri
QVariantMap
properties
;
QString
folderPath
=
url
.
adjusted
(
QUrl
::
RemoveFilename
|
QUrl
::
StripTrailingSlash
).
toLocalFile
();
if
(
folderPath
.
startsWith
(
QDir
::
homePath
()))
{
folderPath
.
replace
(
0
,
QDir
::
homePath
().
length
(),
QStringLiteral
(
"~"
));
}
folderPath
=
KShell
::
tildeCollapse
(
folderPath
);
properties
[
QStringLiteral
(
"urls"
)]
=
QStringList
({
QString
::
fromLocal8Bit
(
url
.
toEncoded
())});
properties
[
QStringLiteral
(
"subtext"
)]
=
folderPath
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment