fix build without scripting
parent
322131d74a
commit
720f9239cc
|
@ -31,7 +31,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#ifdef KWIN_BUILD_TABBOX
|
#ifdef KWIN_BUILD_TABBOX
|
||||||
#include "tabbox.h"
|
#include "tabbox.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef KWIN_BUILD_SCRIPTING
|
||||||
#include "scripting/scriptedeffect.h"
|
#include "scripting/scriptedeffect.h"
|
||||||
|
#endif
|
||||||
#include "thumbnailitem.h"
|
#include "thumbnailitem.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#include "kwinglutils.h"
|
#include "kwinglutils.h"
|
||||||
|
@ -1323,6 +1325,7 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
|
||||||
|
|
||||||
bool EffectsHandlerImpl::loadScriptedEffect(const QString& name, KService *service)
|
bool EffectsHandlerImpl::loadScriptedEffect(const QString& name, KService *service)
|
||||||
{
|
{
|
||||||
|
#ifdef KWIN_BUILD_SCRIPTING
|
||||||
const KDesktopFile df("services", service->entryPath());
|
const KDesktopFile df("services", service->entryPath());
|
||||||
const QString scriptName = df.desktopGroup().readEntry<QString>("X-Plasma-MainScript", "");
|
const QString scriptName = df.desktopGroup().readEntry<QString>("X-Plasma-MainScript", "");
|
||||||
if (scriptName.isEmpty()) {
|
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));
|
effect_order.insert(service->property("X-KDE-Ordering").toInt(), EffectPair(name, effect));
|
||||||
effectsChanged();
|
effectsChanged();
|
||||||
return true;
|
return true;
|
||||||
|
#else
|
||||||
|
Q_UNUSED(name)
|
||||||
|
Q_UNUSED(service)
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectsHandlerImpl::unloadEffect(const QString& name)
|
void EffectsHandlerImpl::unloadEffect(const QString& name)
|
||||||
|
|
Loading…
Reference in New Issue