LanguageClient: Fix possible crash

If a restart for a client has been staged for restart the
shutdown of QC may coincide with the start of the client which
leads to a crash on exit. Correctly track clients that never
successfully started to clean them up on manager destruction.

Change-Id: I639a76318d1665653fbcd37841fcaf407f3d3a83
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2021-08-25 13:55:45 +02:00
parent cd3f82f247
commit 752b967952
3 changed files with 16 additions and 8 deletions

View File

@@ -1076,6 +1076,7 @@ void Client::setSnippetsGroup(const QString &group)
void Client::start()
{
LanguageClientManager::addClient(this);
if (m_clientInterface->start())
LanguageClientManager::clientStarted(this);
else