Editor: delete processor after canceling

Set a null proposal has the potential to restart the processor
in combination with the invalidateCurrentRequestData from this
cancelCurrentRequest will result in a restarted processor that is not
tracked via m_asyncProcessor.

Change-Id: Ia0e0d49564170a1e705994933d07e00c23f24f5d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-05-14 08:18:32 +02:00
parent 738726d656
commit 755de9f86a

View File

@@ -292,7 +292,7 @@ void CodeAssistantPrivate::cancelCurrentRequest()
}
if (m_asyncProcessor) {
m_asyncProcessor->cancel();
m_asyncProcessor->setAsyncProposalAvailable(nullptr);
delete m_asyncProcessor;
}
invalidateCurrentRequestData();
}