MCPcopy Create free account
hub / github.com/Sonic-DE/sonic-win / actionsForUserActionMenu

Method actionsForUserActionMenu

src/scripting/scripting.cpp:469–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469QList<QAction *> KWin::Script::actionsForUserActionMenu(KWin::Window *client, QMenu *parent)
470{
471 QList<QAction *> actions;
472 actions.reserve(m_userActionsMenuCallbacks.count());
473
474 for (QJSValue callback : std::as_const(m_userActionsMenuCallbacks)) {
475 const QJSValue result = callback.call({m_engine->toScriptValue(client)});
476 if (result.isError()) {
477 continue;
478 }
479 if (!result.isObject()) {
480 continue;
481 }
482 if (QAction *action = scriptValueToAction(result, parent)) {
483 actions << action;
484 }
485 }
486
487 return actions;
488}
489
490bool KWin::Script::slotBorderActivated(ElectricBorder border)
491{

Callers 1

menuAboutToShowMethod · 0.80

Calls 3

reserveMethod · 0.80
callMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected