VcsBaseEditor: Remove default actions when right-clicking a reference

Change-Id: I2e8abd4487756be2535934ca8ab4d6b9105e6088
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2020-02-27 22:41:42 +02:00
committed by Orgad Shaneh
parent 9455b144b2
commit d9ca238ffe

View File

@@ -964,13 +964,17 @@ void VcsBaseEditorWidget::slotCursorPositionChanged()
void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e)
{
QPointer<QMenu> menu = createStandardContextMenu();
QPointer<QMenu> menu;
// 'click on change-interaction'
if (supportChangeLinks()) {
const QTextCursor cursor = cursorForPosition(e->pos());
if (Internal::AbstractTextCursorHandler *handler = d->findTextCursorHandler(cursor))
if (Internal::AbstractTextCursorHandler *handler = d->findTextCursorHandler(cursor)) {
menu = new QMenu;
handler->fillContextMenu(menu, d->m_parameters->type);
}
}
if (!menu)
menu = createStandardContextMenu();
switch (d->m_parameters->type) {
case LogOutput: // log might have diff
case DiffOutput: {