MCPcopy Create free account
hub / github.com/KDAB/GammaRay / triggerAction

Method triggerAction

plugins/actioninspector/actioninspector.cpp:60–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58ActionInspector::~ActionInspector() = default;
59
60void ActionInspector::triggerAction(int row)
61{
62 auto model = ObjectBroker::model(QStringLiteral("com.kdab.GammaRay.ActionModel"));
63 const QModelIndex index = model->index(row, 0);
64 if (!index.isValid())
65 return;
66
67 QObject *obj = index.data(ActionModel::ObjectRole).value<QObject *>();
68 QAction *action = qobject_cast<QAction *>(obj);
69
70 if (action)
71 action->trigger();
72}
73
74void GammaRay::ActionInspector::objectSelected(QObject *obj)
75{

Callers

nothing calls this directly

Calls 3

indexMethod · 0.45
isValidMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected