Commit b31aea19 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Baloo Runner: Use KShell::tildeCollapse

Rather than doing it manually
parent 2370b662
......@@ -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;
......
Markdown is supported
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