Commit 35256285 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Fix trash KCM not showing up in KRunner

In this case we do not want the trader constraint, because we can open the KCMs
in kcmshell.

BUG: 448449
parent a08ce248
Pipeline #124938 passed with stage
in 1 minute and 14 seconds
......@@ -51,7 +51,7 @@ inline QList<KPluginMetaData> findExternalKCMModules(MetaDataSource source)
return metaDataList;
}
inline QList<KPluginMetaData> findKCMsMetaData(MetaDataSource source)
inline QList<KPluginMetaData> findKCMsMetaData(MetaDataSource source, bool useSystemsettingsConstraint = true)
{
QList<KPluginMetaData> modules;
QSet<QString> uniquePluginIds;
......@@ -67,7 +67,9 @@ inline QList<KPluginMetaData> findKCMsMetaData(MetaDataSource source)
if (source & SystemSettings) {
metaDataList << KPluginMetaData::findPlugins(QStringLiteral("plasma/kcms/systemsettings"), filter);
metaDataList << KPluginMetaData::findPlugins(QStringLiteral("plasma/kcms/systemsettings_qwidgets"), filter);
services += KServiceTypeTrader::self()->query(QStringLiteral("KCModule"), QStringLiteral("[X-KDE-System-Settings-Parent-Category] != ''"));
services +=
KServiceTypeTrader::self()->query(QStringLiteral("KCModule"),
useSystemsettingsConstraint ? QStringLiteral("[X-KDE-System-Settings-Parent-Category] != ''") : QString());
}
if (source & KInfoCenter) {
metaDataList << KPluginMetaData::findPlugins(QStringLiteral("plasma/kcms/kinfocenter"), filter);
......
......@@ -51,7 +51,7 @@ void SystemsettingsRunner::match(Plasma::RunnerContext &context)
QMutexLocker lock(&m_mutex);
if (m_modules.isEmpty()) {
KSycoca::disableAutoRebuild();
m_modules = findKCMsMetaData(MetaDataSource::All);
m_modules = findKCMsMetaData(MetaDataSource::All, false);
}
}
matchNameKeywordAndGenericName(context);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment