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
Plasma Workspace
Commits
d2f948ec
Commit
d2f948ec
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
parent
3a9b196c
Pipeline
#135847
passed with stage
in 7 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
runners/appstream/appstreamrunner.cpp
View file @
d2f948ec
...
...
@@ -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
);
...
...
Alexander Lohnau
💬
@alex
mentioned in commit
a9926cae
·
Feb 10, 2022
mentioned in commit
a9926cae
mentioned in commit a9926cae23244c97c5066cf37372c7420b285099
Toggle commit list
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