From 510a07a13502c625507bfb98cb49a82b9830aa59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 1 Jan 2012 10:00:13 +0100 Subject: [PATCH] Better set the QScript export of a Client We don't want the script to delete our Client, or do we? --- scripting/workspace.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripting/workspace.cpp b/scripting/workspace.cpp index 5eea42b695..d028abf48c 100644 --- a/scripting/workspace.cpp +++ b/scripting/workspace.cpp @@ -25,7 +25,8 @@ along with this program. If not, see . KWin::Workspace* SWrapper::Workspace::centralObject = 0; QScriptValue SWrapper::valueForClient(KWin::Client *client, QScriptEngine *engine) { - return engine->newQObject(client); + return engine->newQObject(client, QScriptEngine::QtOwnership, + QScriptEngine::ExcludeChildObjects | QScriptEngine::ExcludeDeleteLater | QScriptEngine::PreferExistingWrapperObject); } SWrapper::Workspace::Workspace(QObject* parent) : QObject(parent)