diff --git a/autotests/integration/effects/translucency_test.cpp b/autotests/integration/effects/translucency_test.cpp
index 428026d48c..d2073891b2 100644
--- a/autotests/integration/effects/translucency_test.cpp
+++ b/autotests/integration/effects/translucency_test.cpp
@@ -71,11 +71,10 @@ void TranslucencyTest::initTestCase()
plugins.writeEntry(name + QStringLiteral("Enabled"), false);
}
config->group("Outline").writeEntry(QStringLiteral("QmlPath"), QString("/does/not/exist.qml"));
+ config->group("Effect-kwin4_effect_translucency").writeEntry(QStringLiteral("Dialogs"), 90);
config->sync();
kwinApp()->setConfig(config);
- // TODO: make effects use KWin's config directly
- KSharedConfig::openConfig(QStringLiteral(KWIN_CONFIG), KConfig::NoGlobals)->group("Effect-kwin4_effect_translucency").writeEntry(QStringLiteral("Dialogs"), 90);
qputenv("KWIN_EFFECTS_FORCE_ANIMATIONS", "1");
kwinApp()->start();
diff --git a/scripting/scriptedeffect.cpp b/scripting/scriptedeffect.cpp
index 193ed958dc..0d59b89307 100644
--- a/scripting/scriptedeffect.cpp
+++ b/scripting/scriptedeffect.cpp
@@ -23,6 +23,7 @@ along with this program. If not, see .
#include "scriptingutils.h"
#include "workspace_wrapper.h"
#include "../screenedge.h"
+#include "../main.h"
#include "scripting_logging.h"
// KDE
#include
@@ -482,7 +483,7 @@ bool ScriptedEffect::init(const QString &effectName, const QString &pathToScript
// does the effect contain an KConfigXT file?
const QString kconfigXTFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String(KWIN_NAME "/effects/") + m_effectName + QLatin1String("/contents/config/main.xml"));
if (!kconfigXTFile.isNull()) {
- KConfigGroup cg = effects->effectConfig(m_effectName);
+ KConfigGroup cg = kwinApp()->config()->group(QStringLiteral("Effect-%1").arg(m_effectName));
QFile xmlFile(kconfigXTFile);
m_config = new KConfigLoader(cg, &xmlFile, this);
m_config->load();