[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
This commit is contained in:
Martin Gräßlin 2016-11-03 08:13:25 +01:00
parent 4730be084c
commit be9ee989b1

View file

@ -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);