Commit 422d825d authored by Thomas Hartmann's avatar Thomas Hartmann

QmlJSEditor: only show context menu for Quick Toolbar if available

Task-number: QTCREATORBUG-4521
Change-Id: Iedd97549c6f724b58a0727694ea1b34a2c70d9e9
Reviewed-on: http://codereview.qt.nokia.com/2264Reviewed-by: default avatarLeandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@nokia.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent e8bc4851
......@@ -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);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment