LanguageClient: Add signal to inform about WorkDoneProgressEnd

... and make use of it in the clangd client to be able tell when
background indexing has finished.

Change-Id: I0f3c6f9646fd66ababd08c12b2f347da5f1a3729
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-04-20 15:46:35 +02:00
parent 8e352af0ec
commit 91b6c58518
10 changed files with 35 additions and 17 deletions

View File

@@ -326,7 +326,7 @@ void ClangModelManagerSupport::updateLanguageClient(ProjectExplorer::Project *pr
CompilationDbPurpose::CodeModel));
}
LanguageClient::Client *ClangModelManagerSupport::clientForProject(
ClangdClient *ClangModelManagerSupport::clientForProject(
const ProjectExplorer::Project *project)
{
const QList<Client *> clients = Utils::filtered(
@@ -337,11 +337,11 @@ LanguageClient::Client *ClangModelManagerSupport::clientForProject(
&& c->state() != Client::Shutdown;
});
QTC_CHECK(clients.size() <= 1);
return clients.empty() ? nullptr : clients.first();
return clients.empty() ? nullptr : qobject_cast<ClangdClient *>(clients.first());
}
Client *ClangModelManagerSupport::createClient(ProjectExplorer::Project *project,
const Utils::FilePath &jsonDbDir)
ClangdClient *ClangModelManagerSupport::createClient(ProjectExplorer::Project *project,
const Utils::FilePath &jsonDbDir)
{
return new ClangdClient(project, jsonDbDir);
}