Add the snippets to the completion box when the character at the left of the text cursor is a delimiter.

This commit is contained in:
Roberto Raggi
2010-01-26 15:21:58 +01:00
parent cf35a0249b
commit f753d3328b

View File

@@ -919,16 +919,9 @@ int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
return -1;
}
if (isQmlFile) {
if (completionOperator.isNull()
|| completionOperator.isSpace()
|| completionOperator == QLatin1Char('{')
|| completionOperator == QLatin1Char('}')
|| completionOperator == QLatin1Char(':')
|| completionOperator == QLatin1Char(';')) {
updateSnippets();
m_completions.append(m_snippets);
}
if (isQmlFile && (completionOperator.isNull() || completionOperator.isSpace() || isDelimiter(completionOperator))) {
updateSnippets();
m_completions.append(m_snippets);
}
if (! m_completions.isEmpty())