From 69fccf9c28b34553870f792865e5eee97afd20cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Thu, 5 Mar 2015 00:44:47 +0100 Subject: [PATCH] Fix loading of effect config plugins X-KDE-ParentComponents is a list, so we have to check if this list contains the plugin, not do a string comparison. It seems the queryparser has become a bit stricter in this case. This query should be fixed anyway, however, and it fixes a fairly important bug in the effect system. REVIEW:122821 --- kcmkwin/kwincompositing/effectconfig.cpp | 2 +- kcmkwin/kwindesktop/main.cpp | 2 +- kcmkwin/kwintabbox/main.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kcmkwin/kwincompositing/effectconfig.cpp b/kcmkwin/kwincompositing/effectconfig.cpp index 5ea433596e..ee4eb03f66 100644 --- a/kcmkwin/kwincompositing/effectconfig.cpp +++ b/kcmkwin/kwincompositing/effectconfig.cpp @@ -65,7 +65,7 @@ void EffectConfig::openConfig(const QString &serviceName, bool scripted, const Q } } else { kcm = KPluginTrader::createInstanceFromQuery(s_pluginDir, QString(), - QStringLiteral("[X-KDE-ParentComponents] == '%1'").arg(serviceName), + QStringLiteral("'%1' in [X-KDE-ParentComponents]").arg(serviceName), &dialog); } if (!kcm) { diff --git a/kcmkwin/kwindesktop/main.cpp b/kcmkwin/kwindesktop/main.cpp index c736924660..87c8606d78 100644 --- a/kcmkwin/kwindesktop/main.cpp +++ b/kcmkwin/kwindesktop/main.cpp @@ -619,7 +619,7 @@ void KWinDesktopConfig::slotConfigureEffectClicked() QPointer configDialog = new QDialog(this); KCModule *kcm = KPluginTrader::createInstanceFromQuery(QStringLiteral("kwin/effects/configs/"), QString(), - QStringLiteral("[X-KDE-ParentComponents] == '%1'").arg(effect), + QStringLiteral("'%1' in [X-KDE-ParentComponents]").arg(effect), configDialog); if (!kcm) { delete configDialog; diff --git a/kcmkwin/kwintabbox/main.cpp b/kcmkwin/kwintabbox/main.cpp index 632f4643df..a97bdfa596 100644 --- a/kcmkwin/kwintabbox/main.cpp +++ b/kcmkwin/kwintabbox/main.cpp @@ -539,7 +539,7 @@ void KWinTabBoxConfig::configureEffectClicked() const QString name = BuiltInEffects::nameForEffect(effect == CoverSwitch ? BuiltInEffect::CoverSwitch : BuiltInEffect::FlipSwitch); KCModule *kcm = KPluginTrader::createInstanceFromQuery(QStringLiteral("kwin/effects/configs/"), QString(), - QStringLiteral("[X-KDE-ParentComponents] == '%1'").arg(name), + QStringLiteral("'%1' in [X-KDE-ParentComponents]").arg(name), configDialog); if (!kcm) { delete configDialog;