summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/vcsbase/vcsbaseeditor.cpp8
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: {