Commit b63c83e6 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

runners/baloo: Reduce match type when query is not in filename

This can be the case, if one indexes the file content
parent 0e3b24c9
Pipeline #197152 passed with stage
in 13 minutes and 21 seconds
......@@ -130,7 +130,7 @@ RemoteMatches SearchRunner::matchInternal(const QString &searchTerm, const QStri
match.text = url.fileName();
match.iconName = mimeDb.mimeTypeForFile(localUrl).iconName();
match.relevance = relevance;
match.type = Plasma::QueryMatch::PossibleMatch;
match.type = url.fileName().contains(searchTerm, Qt::CaseInsensitive) ? Plasma::QueryMatch::PossibleMatch : Plasma::QueryMatch::CompletionMatch;
QVariantMap properties;
QString folderPath = url.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash).toLocalFile();
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