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
1bd40e27
Commit
1bd40e27
authored
Dec 02, 2020
by
Nicolas Fella
Browse files
Fix alternatives for applets
X-Plasma-Provides is a list of strings, not a single string
BUG: 429801
BUG: 429800
parent
e0c8b17d
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
View file @
1bd40e27
...
...
@@ -271,10 +271,16 @@ void PlasmaAppletItemModel::populateModel(const QStringList &whatChanged)
auto
filter
=
[
this
](
const
KPluginMetaData
&
plugin
)
->
bool
{
const
QString
provides
=
plugin
.
value
(
QStringLiteral
(
"X-Plasma-Provides"
));
const
QString
List
provides
=
KPluginMetaData
::
readStringList
(
plugin
.
rawData
(),
QStringLiteral
(
"X-Plasma-Provides"
));
if
(
!
m_provides
.
isEmpty
()
&&
!
m_provides
.
contains
(
provides
))
{
return
false
;
if
(
!
m_provides
.
isEmpty
())
{
const
bool
providesFulfilled
=
std
::
any_of
(
m_provides
.
cbegin
(),
m_provides
.
cend
(),
[
&
provides
](
const
QString
&
p
)
{
return
provides
.
contains
(
p
);
});
if
(
!
providesFulfilled
)
{
return
false
;
}
}
if
(
!
plugin
.
isValid
()
||
plugin
.
rawData
().
value
(
QStringLiteral
(
"NoDisplay"
)).
toBool
()
||
plugin
.
category
()
==
QLatin1String
(
"Containments"
))
{
...
...
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