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

This can be the case, if one indexes the file content
wilder-5.26
Alexander Lohnau 4 years ago
parent 0e3b24c954
commit b63c83e645
  1. 2
      runners/baloo/baloosearchrunner.cpp

@ -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();

Loading…
Cancel
Save