forked from qt-creator/qt-creator
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:
committed by
Orgad Shaneh
parent
9455b144b2
commit
d9ca238ffe
@@ -964,13 +964,17 @@ void VcsBaseEditorWidget::slotCursorPositionChanged()
|
|||||||
|
|
||||||
void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
||||||
{
|
{
|
||||||
QPointer<QMenu> menu = createStandardContextMenu();
|
QPointer<QMenu> menu;
|
||||||
// 'click on change-interaction'
|
// 'click on change-interaction'
|
||||||
if (supportChangeLinks()) {
|
if (supportChangeLinks()) {
|
||||||
const QTextCursor cursor = cursorForPosition(e->pos());
|
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);
|
handler->fillContextMenu(menu, d->m_parameters->type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (!menu)
|
||||||
|
menu = createStandardContextMenu();
|
||||||
switch (d->m_parameters->type) {
|
switch (d->m_parameters->type) {
|
||||||
case LogOutput: // log might have diff
|
case LogOutput: // log might have diff
|
||||||
case DiffOutput: {
|
case DiffOutput: {
|
||||||
|
|||||||
Reference in New Issue
Block a user