Commit 02cc2177 authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Add completion for "id:".

parent 45415783
...@@ -716,6 +716,12 @@ int CodeCompletion::startCompletion(TextEditor::ITextEditable *editor) ...@@ -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);
......
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