diff --git a/src/kcms/common/effectsmodel.cpp b/src/kcms/common/effectsmodel.cpp index 86e6064f57..382a125bcb 100644 --- a/src/kcms/common/effectsmodel.cpp +++ b/src/kcms/common/effectsmodel.cpp @@ -312,10 +312,8 @@ void EffectsModel::loadJavascriptEffects(const KConfigGroup &kwinConfig) const QString pluginKeyword = plugin.value(QStringLiteral("X-KDE-PluginKeyword")); if (!pluginKeyword.isEmpty()) { - QDir package(QFileInfo(plugin.metaDataFileName()).dir()); - package.cd(QStringLiteral("contents")); - const QString xmlFile = package.filePath(QStringLiteral("config/main.xml")); - const QString uiFile = package.filePath(QStringLiteral("ui/config.ui")); + const QString xmlFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kwin/effects/") + plugin.pluginId() + QLatin1String("/contents/config/main.xml")); + const QString uiFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kwin/effects/") + plugin.pluginId() + QLatin1String("/contents/ui/config.ui")); effect.configurable = QFileInfo::exists(xmlFile) && QFileInfo::exists(uiFile); } else { effect.configurable = false;