| 75 | } |
| 76 | |
| 77 | void QmlContextTab::propertiesContextMenu(QPoint pos) |
| 78 | { |
| 79 | const auto idx = ui->contextPropertyView->indexAt(pos); |
| 80 | if (!idx.isValid()) |
| 81 | return; |
| 82 | |
| 83 | const auto actions = idx.data(PropertyModel::ActionRole).toInt(); |
| 84 | const auto objectId = idx.data(PropertyModel::ObjectIdRole).value<ObjectId>(); |
| 85 | ContextMenuExtension ext(objectId); |
| 86 | const bool canShow = (actions == PropertyModel::NavigateTo && !objectId.isNull()) |
| 87 | || ext.discoverPropertySourceLocation(ContextMenuExtension::GoTo, idx); |
| 88 | |
| 89 | if (!canShow) |
| 90 | return; |
| 91 | |
| 92 | QMenu contextMenu; |
| 93 | ext.populateMenu(&contextMenu); |
| 94 | contextMenu.exec(ui->contextPropertyView->viewport()->mapToGlobal(pos)); |
| 95 | } |
nothing calls this directly
no test coverage detected