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

Method eventTreeContextMenu

plugins/eventmonitor/eventmonitorwidget.cpp:91–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void EventMonitorWidget::eventTreeContextMenu(QPoint pos)
92{
93 auto index = ui->eventTree->indexAt(pos);
94 if (!index.isValid())
95 return;
96 index = index.sibling(index.row(), EventModelColumn::Receiver);
97
98 const auto objectId = index.data(EventModelRole::ReceiverIdRole).value<ObjectId>();
99 if (objectId.isNull())
100 return;
101
102 QMenu menu;
103 ContextMenuExtension ext(objectId);
104 ext.populateMenu(&menu);
105 menu.exec(ui->eventTree->viewport()->mapToGlobal(pos));
106}
107
108void EventMonitorWidget::eventInspectorContextMenu(QPoint pos)
109{

Callers

nothing calls this directly

Calls 5

rowMethod · 0.80
populateMenuMethod · 0.80
isValidMethod · 0.45
dataMethod · 0.45
isNullMethod · 0.45

Tested by

no test coverage detected