diff --git a/src/plugins/minimizeall/package/contents/code/main.js b/src/plugins/minimizeall/package/contents/code/main.js index d3da871378..da39723740 100644 --- a/src/plugins/minimizeall/package/contents/code/main.js +++ b/src/plugins/minimizeall/package/contents/code/main.js @@ -16,7 +16,7 @@ function isRelevant(client) { } function minimizeAllWindows() { - var allClients = workspace.clientList(); + var allClients = workspace.windowList(); var relevantClients = []; var minimize = false; diff --git a/src/plugins/synchronizeskipswitcher/package/contents/code/main.js b/src/plugins/synchronizeskipswitcher/package/contents/code/main.js index a675acc96f..f6b0cc0bad 100644 --- a/src/plugins/synchronizeskipswitcher/package/contents/code/main.js +++ b/src/plugins/synchronizeskipswitcher/package/contents/code/main.js @@ -17,7 +17,7 @@ function setupConnection(client) { workspace.windowAdded.connect(setupConnection); // connect all existing clients -var clients = workspace.clientList(); +var clients = workspace.windowList(); for (var i=0; i QtScriptWorkspaceWrapper::clientList() const +QList QtScriptWorkspaceWrapper::windowList() const { return workspace()->windows(); } -QQmlListProperty DeclarativeScriptWorkspaceWrapper::clients() +QQmlListProperty DeclarativeScriptWorkspaceWrapper::windows() { - return QQmlListProperty(this, nullptr, &DeclarativeScriptWorkspaceWrapper::countClientList, &DeclarativeScriptWorkspaceWrapper::atClientList); + return QQmlListProperty(this, nullptr, &DeclarativeScriptWorkspaceWrapper::countWindowList, &DeclarativeScriptWorkspaceWrapper::atWindowList); } -qsizetype DeclarativeScriptWorkspaceWrapper::countClientList(QQmlListProperty *clients) +qsizetype DeclarativeScriptWorkspaceWrapper::countWindowList(QQmlListProperty *windows) { return workspace()->windows().size(); } -KWin::Window *DeclarativeScriptWorkspaceWrapper::atClientList(QQmlListProperty *clients, qsizetype index) +KWin::Window *DeclarativeScriptWorkspaceWrapper::atWindowList(QQmlListProperty *windows, qsizetype index) { return workspace()->windows().at(index); } diff --git a/src/scripting/workspace_wrapper.h b/src/scripting/workspace_wrapper.h index 39ae8be7c1..8ed3e3fd10 100644 --- a/src/scripting/workspace_wrapper.h +++ b/src/scripting/workspace_wrapper.h @@ -364,9 +364,9 @@ class QtScriptWorkspaceWrapper : public WorkspaceWrapper Q_OBJECT public: /** - * List of Clients currently managed by KWin. + * List of windows currently managed by KWin. */ - Q_INVOKABLE QList clientList() const; + Q_INVOKABLE QList windowList() const; explicit QtScriptWorkspaceWrapper(QObject *parent = nullptr); }; @@ -375,11 +375,11 @@ class DeclarativeScriptWorkspaceWrapper : public WorkspaceWrapper { Q_OBJECT - Q_PROPERTY(QQmlListProperty clients READ clients) + Q_PROPERTY(QQmlListProperty windows READ windows) public: - QQmlListProperty clients(); - static qsizetype countClientList(QQmlListProperty *clients); - static KWin::Window *atClientList(QQmlListProperty *clients, qsizetype index); + QQmlListProperty windows(); + static qsizetype countWindowList(QQmlListProperty *window); + static KWin::Window *atWindowList(QQmlListProperty *windows, qsizetype index); explicit DeclarativeScriptWorkspaceWrapper(QObject *parent = nullptr); };