[scripting] actionsForUserActionMenu operates on AbstractClient

This commit is contained in:
Martin Gräßlin 2015-03-06 10:49:37 +01:00
parent 519006ffa4
commit 4eb9a98f1a
2 changed files with 5 additions and 4 deletions

View file

@ -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<QAction*> returnActions;
for (QList<QScriptValue>::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<QAction*> actions;
foreach (AbstractScript *script, scripts) {

View file

@ -48,6 +48,7 @@ typedef QList< QPair<bool, QPair<QString, QString > > > 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<QAction*> actionsForUserActionMenu(Client *c, QMenu *parent);
QList<QAction*> actionsForUserActionMenu(AbstractClient *c, QMenu *parent);
KConfigGroup config() const;
const QHash<QAction*, QScriptValue> &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<QAction*> actionsForUserActionMenu(Client *c, QMenu *parent);
QList<QAction*> actionsForUserActionMenu(AbstractClient *c, QMenu *parent);
QQmlEngine *qmlEngine() const;
QQmlEngine *qmlEngine();