|
|
|
|
@ -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 QStringList 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")) { |
|
|
|
|
|