diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index beecf56a8b5254687e76c53d2f2a25416023c5be..d00308b1bd55466f187789bd0d744d78ca3e5bc5 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -661,6 +661,8 @@ static QList<TextEditor::CompletionItem> sortCompletionItems(QList<TextEditor::C int CppCodeCompletion::startCompletion(TextEditor::ITextEditable *editor) { + m_completions.clear(); + int index = startCompletionHelper(editor); if (index != -1) { m_sortedCompletions = QtConcurrent::run(sortCompletionItems, m_completions);