Commit fd8d01d9 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

scripting: Fix type of KWinComponents.Workspace

Currently, the workspace.clients property doesn't work in declarative
scripts because wrong workspace wrapper is used.


(cherry picked from commit 29a85e83)
parent 9f867680
......@@ -650,10 +650,10 @@ void KWin::Scripting::init()
qmlRegisterType<ScriptingModels::V3::ClientModel>("org.kde.kwin", 3, 0, "ClientModel");
qmlRegisterType<ScriptingModels::V3::ClientFilterModel>("org.kde.kwin", 3, 0, "ClientFilterModel");
qmlRegisterSingletonType<QtScriptWorkspaceWrapper>("org.kde.kwin", 3, 0, "Workspace", [](QQmlEngine *qmlEngine, QJSEngine *jsEngine) {
qmlRegisterSingletonType<DeclarativeScriptWorkspaceWrapper>("org.kde.kwin", 3, 0, "Workspace", [](QQmlEngine *qmlEngine, QJSEngine *jsEngine) {
Q_UNUSED(qmlEngine)
Q_UNUSED(jsEngine)
return new QtScriptWorkspaceWrapper();
return new DeclarativeScriptWorkspaceWrapper();
});
qmlRegisterType<KWin::AbstractClient>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment