Editor: Fix crash after resetting clangbackendreceiver

We must report back to the codeassist under all circumstances

Change-Id: Ic9519c80fb7c6b7e54419cb6fef610e3d73d23bd
Fixes: QTCREATORBUG-23708
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-03-25 09:49:23 +01:00
parent a7b7c31c9c
commit c44681a7d2

View File

@@ -147,7 +147,10 @@ bool BackendReceiver::isExpectingCompletionsMessage() const
void BackendReceiver::reset()
{
// Clean up waiting assist processors
qDeleteAll(m_assistProcessorsTable.begin(), m_assistProcessorsTable.end());
for (ClangCompletionAssistProcessor *processor : m_assistProcessorsTable) {
processor->setAsyncProposalAvailable(nullptr);
delete processor;
}
m_assistProcessorsTable.clear();
// Clean up futures for references; TODO: Remove duplication