forked from qt-creator/qt-creator
QmlJSEditor: add shortcut for Qt Quick Helper (ctrl+alt+space)
This shortcut forces the Qt Quick Helper to be shown if available. The action is also registered in the context menu so it is discoverable. Reviewed-by: Christian Kamm
This commit is contained in:
@@ -1338,6 +1338,15 @@ void QmlJSTextEditor::followSymbolUnderCursor()
|
||||
openLink(findLinkAt(textCursor()));
|
||||
}
|
||||
|
||||
void QmlJSTextEditor::showContextPane()
|
||||
{
|
||||
if (m_contextPane) {
|
||||
Node *newNode = m_semanticInfo.declaringMemberNoProperties(position());
|
||||
m_contextPane->apply(editableInterface(), m_semanticInfo.document, m_semanticInfo.snapshot, newNode, false, true);
|
||||
m_oldCursorPosition = position();
|
||||
}
|
||||
}
|
||||
|
||||
void QmlJSTextEditor::contextMenuEvent(QContextMenuEvent *e)
|
||||
{
|
||||
QMenu *menu = new QMenu();
|
||||
@@ -1654,8 +1663,6 @@ void QmlJSTextEditor::updateSemanticInfo(const SemanticInfo &semanticInfo)
|
||||
|
||||
void QmlJSTextEditor::onCursorPositionChanged()
|
||||
{
|
||||
|
||||
|
||||
if (m_contextPane) {
|
||||
Node *newNode = m_semanticInfo.declaringMemberNoProperties(position());
|
||||
Node *oldNode = m_semanticInfo.declaringMemberNoProperties(m_oldCursorPosition);
|
||||
|
Reference in New Issue
Block a user