From be9ee989b19e51a61e257e7224786369ba87cbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 3 Nov 2016 08:13:25 +0100 Subject: [PATCH] [scripting] Fix export of WorkspaceWrapper in QtScript The export of the WorkspaceWrapper was changed to be a subclass with all the elements still being in the parent class. But the "workspace" was exported with QScriptEngine::ExcludeSuperClassContents. Thus all usages of workspace were broken and our tests started to fail on build.kde.org. This change removes the ExcludeSuperClassContents which means that also the QObject properties and slots are now exposed which was previously not the case. CCMAIL: github@chilon.net --- scripting/scripting.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/scripting.cpp b/scripting/scripting.cpp index a1817868be..c25db76f5c 100644 --- a/scripting/scripting.cpp +++ b/scripting/scripting.cpp @@ -296,7 +296,7 @@ void KWin::Script::installScriptFunctions(QScriptEngine* engine) // global properties engine->globalObject().setProperty(QStringLiteral("KWin"), engine->newQMetaObject(&QtScriptWorkspaceWrapper::staticMetaObject)); QScriptValue workspace = engine->newQObject(Scripting::self()->workspaceWrapper(), QScriptEngine::QtOwnership, - QScriptEngine::ExcludeSuperClassContents | QScriptEngine::ExcludeDeleteLater); + QScriptEngine::ExcludeDeleteLater); engine->globalObject().setProperty(QStringLiteral("workspace"), workspace, QScriptValue::Undeletable); // install meta functions KWin::MetaScripting::registration(engine);