Commit 7f96e360 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Increase relevance for jumplist actions when name is an exact match

BUG: 455436
parent b27b31a8
Pipeline #207335 passed with stage
in 6 minutes and 32 seconds
......@@ -232,7 +232,7 @@ void ServiceRunnerTest::testJumpListActions()
runner.match(context);
auto matches = context.matches();
QVERIFY(std::any_of(matches.cbegin(), matches.cend(), [](const Plasma::QueryMatch &match) {
return match.text() == QLatin1String("Open a New Window - Konsole ServiceRunnerTest") && match.relevance() == 0.55;
return match.text() == QLatin1String("Open a New Window - Konsole ServiceRunnerTest") && match.relevance() == 0.65;
}));
context.setQuery(QStringLiteral("new window"));
......
......@@ -390,7 +390,10 @@ private:
match.setData(url);
qreal relevance = 0.5;
if (matchIndex == 0) {
if (action.text().compare(term, Qt::CaseInsensitive) == 0) {
relevance = 0.65;
match.setType(Plasma::QueryMatch::HelperMatch); // Give it a higer match type to ensure it is shown, BUG: 455436
} else if (matchIndex == 0) {
relevance += 0.05;
}
......
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