forked from qt-creator/qt-creator
QmlJS: Add completion for "id:".
This commit is contained in:
@@ -716,6 +716,12 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
|
|||||||
enumerateProperties.setGlobalCompletion(true);
|
enumerateProperties.setGlobalCompletion(true);
|
||||||
enumerateProperties.setEnumerateGeneratedSlots(true);
|
enumerateProperties.setEnumerateGeneratedSlots(true);
|
||||||
|
|
||||||
|
// id: is special
|
||||||
|
TextEditor::CompletionItem idPropertyCompletion(this);
|
||||||
|
idPropertyCompletion.text = QLatin1String("id: ");
|
||||||
|
idPropertyCompletion.icon = symbolIcon;
|
||||||
|
m_completions.append(idPropertyCompletion);
|
||||||
|
|
||||||
addCompletionsPropertyLhs(enumerateProperties(qmlScopeType), symbolIcon);
|
addCompletionsPropertyLhs(enumerateProperties(qmlScopeType), symbolIcon);
|
||||||
addCompletions(enumerateProperties(context.scopeChain().qmlTypes), symbolIcon);
|
addCompletions(enumerateProperties(context.scopeChain().qmlTypes), symbolIcon);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user