From 0420ecd6492a801610149942f23f7097c2e9563a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 23 Dec 2011 08:56:25 +0100 Subject: [PATCH] Scripting does not need to inherit ScriptEngine --- scripting/scripting.cpp | 5 ++--- scripting/scripting.h | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/scripting/scripting.cpp b/scripting/scripting.cpp index b635514e06..8423ab57e3 100644 --- a/scripting/scripting.cpp +++ b/scripting/scripting.cpp @@ -86,10 +86,9 @@ void KWin::Script::sigException(const QScriptValue& exception) } -KWin::Scripting::Scripting() +KWin::Scripting::Scripting(QObject *parent) + : QObject(parent) { - // Default constructor no longer used, scripting can - // be disabled by calling kwin --noscript } void KWin::Scripting::start() diff --git a/scripting/scripting.h b/scripting/scripting.h index cf9d6ca533..6dbee6a05c 100644 --- a/scripting/scripting.h +++ b/scripting/scripting.h @@ -71,14 +71,13 @@ private: /** * The heart of KWin::Scripting. Infinite power lies beyond */ -class Scripting : public QScriptEngine +class Scripting : public QObject { Q_OBJECT private: QStringList scriptList; QDir scriptsDir; QVector scripts; - SWrapper::WorkspaceProxy proxy; // Preferably call ONLY at load time void runScripts(); @@ -89,7 +88,7 @@ private: void runScript(KWin::Script*); public: - Scripting(); + Scripting(QObject *parent = NULL); /** * Start running scripts. This was essential to have KWin::Scripting * be initialized on stack and also have the option to disable scripting.