scripting: Register Workspace singleton type

This commit is contained in:
Vlad Zahorodnii 2021-07-20 14:16:44 +03:00
parent 5435865329
commit 2b06957f6f

View file

@ -649,6 +649,12 @@ 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) {
Q_UNUSED(qmlEngine)
Q_UNUSED(jsEngine)
return new QtScriptWorkspaceWrapper();
});
qmlRegisterType<KWin::AbstractClient>();
qmlRegisterType<KWin::X11Client>();
qmlRegisterType<QAbstractItemModel>();