From 720f9239cc0d31429fd16d0b8fdedfe977ed3b44 Mon Sep 17 00:00:00 2001 From: Ni Hui Date: Sun, 23 Sep 2012 13:23:41 +0800 Subject: [PATCH] fix build without scripting --- effects.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/effects.cpp b/effects.cpp index dabb96aeca..e97e92a465 100644 --- a/effects.cpp +++ b/effects.cpp @@ -31,7 +31,9 @@ along with this program. If not, see . #ifdef KWIN_BUILD_TABBOX #include "tabbox.h" #endif +#ifdef KWIN_BUILD_SCRIPTING #include "scripting/scriptedeffect.h" +#endif #include "thumbnailitem.h" #include "workspace.h" #include "kwinglutils.h" @@ -1323,6 +1325,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault) bool EffectsHandlerImpl::loadScriptedEffect(const QString& name, KService *service) { +#ifdef KWIN_BUILD_SCRIPTING const KDesktopFile df("services", service->entryPath()); const QString scriptName = df.desktopGroup().readEntry("X-Plasma-MainScript", ""); if (scriptName.isEmpty()) { @@ -1342,6 +1345,11 @@ bool EffectsHandlerImpl::loadScriptedEffect(const QString& name, KService *servi effect_order.insert(service->property("X-KDE-Ordering").toInt(), EffectPair(name, effect)); effectsChanged(); return true; +#else + Q_UNUSED(name) + Q_UNUSED(service) + return false; +#endif } void EffectsHandlerImpl::unloadEffect(const QString& name)