From 4eb9a98f1a6da0d2186624055eb9fc6ce43384da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 6 Mar 2015 10:49:37 +0100 Subject: [PATCH] [scripting] actionsForUserActionMenu operates on AbstractClient --- scripting/scripting.cpp | 4 ++-- scripting/scripting.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripting/scripting.cpp b/scripting/scripting.cpp index 9dc7badba8..a49ab7f604 100644 --- a/scripting/scripting.cpp +++ b/scripting/scripting.cpp @@ -332,7 +332,7 @@ void KWin::AbstractScript::registerUseractionsMenuCallback(QScriptValue callback m_userActionsMenuCallbacks.append(callback); } -QList< QAction * > KWin::AbstractScript::actionsForUserActionMenu(KWin::Client *c, QMenu *parent) +QList< QAction * > KWin::AbstractScript::actionsForUserActionMenu(KWin::AbstractClient *c, QMenu *parent) { QList returnActions; for (QList::const_iterator it = m_userActionsMenuCallbacks.constBegin(); it != m_userActionsMenuCallbacks.constEnd(); ++it) { @@ -785,7 +785,7 @@ KWin::Scripting::~Scripting() s_self = nullptr; } -QList< QAction * > KWin::Scripting::actionsForUserActionMenu(KWin::Client *c, QMenu *parent) +QList< QAction * > KWin::Scripting::actionsForUserActionMenu(KWin::AbstractClient *c, QMenu *parent) { QList actions; foreach (AbstractScript *script, scripts) { diff --git a/scripting/scripting.h b/scripting/scripting.h index ac495db545..6873332635 100644 --- a/scripting/scripting.h +++ b/scripting/scripting.h @@ -48,6 +48,7 @@ typedef QList< QPair > > LoadScriptList; namespace KWin { +class AbstractClient; class Client; class ScriptUnloaderAgent; class WorkspaceWrapper; @@ -119,7 +120,7 @@ public: * @return QList< QAction* > List of QActions obtained from asking the registered callbacks * @see registerUseractionsMenuCallback **/ - QList actionsForUserActionMenu(Client *c, QMenu *parent); + QList actionsForUserActionMenu(AbstractClient *c, QMenu *parent); KConfigGroup config() const; const QHash &shortcutCallbacks() const { @@ -351,7 +352,7 @@ public: * @param parent The parent menu to which to add created child menus and items * @return QList< QAction* > List of all actions aggregated from all scripts. **/ - QList actionsForUserActionMenu(Client *c, QMenu *parent); + QList actionsForUserActionMenu(AbstractClient *c, QMenu *parent); QQmlEngine *qmlEngine() const; QQmlEngine *qmlEngine();