Sort the completion items when searching for common prefixes.

Reviewed-by: Thorbjørn Lindeijer
This commit is contained in:
Roberto Raggi
2010-12-20 16:10:56 +01:00
parent a73e1f7596
commit 207c295552
5 changed files with 21 additions and 3 deletions

View File

@@ -745,7 +745,7 @@ int CppCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
}
if (m_completionOperator != T_EOF_SYMBOL)
qSort(m_completions.begin(), m_completions.end(), completionItemLessThan);
sortCompletion(m_completions);
// always remove duplicates
m_completions = removeDuplicates(m_completions);