| 58 | ActionInspector::~ActionInspector() = default; |
| 59 | |
| 60 | void 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 | |
| 74 | void GammaRay::ActionInspector::objectSelected(QObject *obj) |
| 75 | { |