| 140 | } |
| 141 | |
| 142 | void ModelInspectorWidget::modelContextMenu(QPoint pos) |
| 143 | { |
| 144 | const auto index = ui->modelView->indexAt(pos); |
| 145 | if (!index.isValid()) |
| 146 | return; |
| 147 | |
| 148 | const auto objectId = index.data(ObjectModel::ObjectIdRole).value<ObjectId>(); |
| 149 | QMenu menu; |
| 150 | ContextMenuExtension ext(objectId); |
| 151 | ext.setLocation(ContextMenuExtension::Creation, index.data(ObjectModel::CreationLocationRole).value<SourceLocation>()); |
| 152 | ext.setLocation(ContextMenuExtension::Declaration, |
| 153 | index.data(ObjectModel::DeclarationLocationRole).value<SourceLocation>()); |
| 154 | ext.populateMenu(&menu); |
| 155 | |
| 156 | menu.exec(ui->modelView->viewport()->mapToGlobal(pos)); |
| 157 | } |
| 158 | |
| 159 | void ModelInspectorWidget::selectionModelContextMenu(QPoint pos) |
| 160 | { |
nothing calls this directly
no test coverage detected