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
This commit is contained in:
Sebastian Kügler 2015-03-05 00:44:47 +01:00
parent b275daa576
commit 69fccf9c28
3 changed files with 3 additions and 3 deletions

View file

@ -65,7 +65,7 @@ void EffectConfig::openConfig(const QString &serviceName, bool scripted, const Q
}
} else {
kcm = KPluginTrader::createInstanceFromQuery<KCModule>(s_pluginDir, QString(),
QStringLiteral("[X-KDE-ParentComponents] == '%1'").arg(serviceName),
QStringLiteral("'%1' in [X-KDE-ParentComponents]").arg(serviceName),
&dialog);
}
if (!kcm) {

View file

@ -619,7 +619,7 @@ void KWinDesktopConfig::slotConfigureEffectClicked()
QPointer<QDialog> configDialog = new QDialog(this);
KCModule *kcm = KPluginTrader::createInstanceFromQuery<KCModule>(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;

View file

@ -539,7 +539,7 @@ void KWinTabBoxConfig::configureEffectClicked()
const QString name = BuiltInEffects::nameForEffect(effect == CoverSwitch ? BuiltInEffect::CoverSwitch : BuiltInEffect::FlipSwitch);
KCModule *kcm = KPluginTrader::createInstanceFromQuery<KCModule>(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;