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
System Settings
Commits
99908ccb
Commit
99908ccb
authored
Mar 26, 2022
by
Alexander Lohnau
💬
Browse files
systemsettings runner: Ensure that we match keywords case insensitively
BUG: 451634
parent
5319864a
Pipeline
#154993
passed with stage
in 1 minute and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
runner/systemsettingsrunner.cpp
View file @
99908ccb
...
...
@@ -159,7 +159,7 @@ void SystemsettingsRunner::matchNameKeywordAndGenericName(Plasma::RunnerContext
const
QString
&
query
=
ctx
.
query
();
const
QStringList
keywords
=
data
.
value
(
QStringLiteral
(
"X-KDE-Keywords"
)).
split
(
QLatin1Char
(
','
));
bool
anyKeywordMatches
=
std
::
any_of
(
keywords
.
begin
(),
keywords
.
end
(),
[
&
query
](
const
QString
&
keyword
)
{
return
keyword
.
startsWith
(
query
);
return
keyword
.
startsWith
(
query
,
Qt
::
CaseInsensitive
);
});
if
(
anyKeywordMatches
&&
keywords
.
contains
(
query
,
Qt
::
CaseInsensitive
))
{
relevance
=
0.5
;
// If the keyword matches exactly we give it the same relevance as if the description matched
...
...
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