diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2020-02-27 22:41:42 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2020-02-28 07:06:49 +0000 |
commit | d9ca238ffeede9c9af780cc86615057ed3b079c5 (patch) | |
tree | 2e7e5e583f0b391e3fb27ebda81b44825eb27c22 /src/plugins/vcsbase | |
parent | 9455b144b2e65cae9205731992c488687fd2b369 (diff) |
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>
Diffstat (limited to 'src/plugins/vcsbase')
-rw-r--r-- | src/plugins/vcsbase/vcsbaseeditor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp index 98165ec70d..5338580354 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.cpp +++ b/src/plugins/vcsbase/vcsbaseeditor.cpp @@ -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: { |