diff --git a/effects.cpp b/effects.cpp index 4da5753e3c..8e73780066 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1236,13 +1236,14 @@ bool EffectsHandlerImpl::loadScriptedEffect(const QString& name, KService *servi kDebug(1212) << "X-Plasma-MainScript not set"; return false; } - const QString scriptFile = KStandardDirs::locateLocal("data", "kwin/effects/" + name + '/' + scriptName); + const QString scriptFile = KStandardDirs::locate("data", "kwin/effects/" + name + "/contents/" + scriptName); if (scriptFile.isNull()) { kDebug(1212) << "Could not locate the effect script"; return false; } ScriptedEffect *effect = ScriptedEffect::create(name, scriptFile); if (!effect) { + kDebug(1212) << "Could not initialize scripted effect: " << name; return false; } effect_order.insert(service->property("X-KDE-Ordering").toInt(), EffectPair(name, effect)); diff --git a/scripting/scriptedeffect.cpp b/scripting/scriptedeffect.cpp index f30daf7a97..978ecb2764 100644 --- a/scripting/scriptedeffect.cpp +++ b/scripting/scriptedeffect.cpp @@ -138,6 +138,7 @@ bool ScriptedEffect::init(const QString &effectName, const QString &pathToScript { QFile scriptFile(pathToScript); if (!scriptFile.open(QIODevice::ReadOnly)) { + kDebug(1212) << "Could not open script file: " << pathToScript; return false; } m_effectName = effectName; @@ -245,7 +246,7 @@ QVariant ScriptedEffect::readConfig(const QString& key) bool ScriptedEffect::loadConfig(const QString& name) { - const QString path = KStandardDirs::locateLocal("data", "kwin/effects/" + m_effectName + "/config/" + name + ".xml"); + const QString path = KStandardDirs::locate("data", "kwin/effects/" + m_effectName + "/contents/config/" + name + ".xml"); if (path.isEmpty()) { return false; }