LanguageClient: Do not untrack documents before restarting a client

shutdownClient removed the association between the document and the
client, but this is one of the information we would like to keep when
restarting a client. Also we never want to delete the client when
calling restart.

Change-Id: I0558c27ba4b9171c7933edaf2e17847d4e6f62b6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2023-01-16 14:03:55 +01:00
parent 9ff307253d
commit ca2979ca52

View File

@@ -109,8 +109,11 @@ void LanguageClient::LanguageClientManager::addClient(Client *client)
void LanguageClientManager::restartClient(Client *client)
{
QTC_ASSERT(managerInstance, return);
if (!client)
return;
managerInstance->m_restartingClients.insert(client);
shutdownClient(client);
if (client->reachable())
client->shutdown();
}
void LanguageClientManager::clientStarted(Client *client)