forked from qt-creator/qt-creator
QmlJSEditor: only show context menu for Quick Toolbar if available
Task-number: QTCREATORBUG-4521 Change-Id: Iedd97549c6f724b58a0727694ea1b34a2c70d9e9 Reviewed-on: http://codereview.qt.nokia.com/2264 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
@@ -1389,6 +1389,10 @@ void QmlJSTextEditorWidget::contextMenuEvent(QContextMenuEvent *e)
|
||||
menu->addAction(action);
|
||||
if (action->objectName() == QmlJSEditor::Constants::M_REFACTORING_MENU_INSERTION_POINT)
|
||||
menu->addMenu(refactoringMenu);
|
||||
if (action->objectName() == QmlJSEditor::Constants::SHOW_QT_QUICK_HELPER) {
|
||||
bool enabled = m_contextPane->isAvailable(editor(), semanticInfo().document, m_semanticInfo.declaringMemberNoProperties(position()));
|
||||
action->setEnabled(enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user