LanguageClient: Fix crash on closing qc while restarting a server

Reset the assist providers when restarting a server, so the client can
be safely shutdown while closing Qt Creator.

Change-Id: I4d5f18582a8c67cbe02974d72fcef9703ed64dc4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2019-12-10 09:41:11 +01:00
parent d935f2fe6a
commit 017ed74400

View File

@@ -814,6 +814,8 @@ bool Client::reset()
m_project = nullptr; m_project = nullptr;
for (const DocumentUri &uri : m_diagnostics.keys()) for (const DocumentUri &uri : m_diagnostics.keys())
removeDiagnostics(uri); removeDiagnostics(uri);
for (TextEditor::TextDocument *document : m_resetAssistProvider.keys())
resetAssistProviders(document);
return true; return true;
} }