ClangCodeModel: reuse Id for restarted clients

This is needed to keep annotations hidden after the restart of clangd if
the user disabled them in the text mark tooltip.

Change-Id: I69a668f2ba71f1dda83eca74a064af7ec1f92e77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2023-01-11 13:24:49 +01:00
parent 7c35363cda
commit 3677932266
5 changed files with 15 additions and 10 deletions

View File

@@ -355,8 +355,8 @@ static void addCompilationDb(QJsonObject &parentObject, const QJsonObject &cdb)
parentObject.insert("compilationDatabaseChanges", cdb);
}
ClangdClient::ClangdClient(Project *project, const Utils::FilePath &jsonDbDir)
: Client(clientInterface(project, jsonDbDir)), d(new Private(this, project))
ClangdClient::ClangdClient(Project *project, const Utils::FilePath &jsonDbDir, const Id &id)
: Client(clientInterface(project, jsonDbDir), id), d(new Private(this, project))
{
setName(tr("clangd"));
LanguageFilter langFilter;