Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
a9926cae
Commit
a9926cae
authored
Feb 10, 2022
by
Alexander Lohnau
💬
Committed by
Nate Graham
Feb 10, 2022
Browse files
appstream runner: De-duplicate results from multiple sources
BUG: 448619
FIXED-IN: 5.24.1 (cherry picked from commit
d2f948ec
)
parent
12f8228d
Pipeline
#135848
passed with stage
in 7 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
runners/appstream/appstreamrunner.cpp
View file @
a9926cae
...
...
@@ -18,6 +18,8 @@
#include
<KLocalizedString>
#include
<KSycoca>
#include
<set>
#include
"debug.h"
K_PLUGIN_CLASS_WITH_JSON
(
InstallerRunner
,
"plasma-runner-appstream.json"
)
...
...
@@ -87,6 +89,7 @@ void InstallerRunner::match(Plasma::RunnerContext &context)
}
}
std
::
set
<
QString
>
uniqueIds
;
const
auto
components
=
findComponentsByString
(
context
.
query
()).
mid
(
0
,
3
);
for
(
const
AppStream
::
Component
&
component
:
components
)
{
...
...
@@ -118,6 +121,10 @@ void InstallerRunner::match(Plasma::RunnerContext &context)
if
(
!
servicesFound
.
isEmpty
())
continue
;
const
auto
[
_
,
inserted
]
=
uniqueIds
.
insert
(
componentId
);
if
(
!
inserted
)
{
continue
;
}
Plasma
::
QueryMatch
match
(
this
);
match
.
setType
(
Plasma
::
QueryMatch
::
PossibleMatch
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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