LanguageClient: Pass out a mutable Project object

Callers can have legitimate reasons to use it in a non-const manner.

Change-Id: Id91a4708dd95845661b291ce7cc9ee1581bdade8
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-09-23 12:11:31 +02:00
parent dde5a52693
commit c47312a836
3 changed files with 4 additions and 7 deletions

View File

@@ -433,10 +433,7 @@ void ClangModelManagerSupport::watchForExternalChanges()
if (client && client->state() != Client::Shutdown
&& client->state() != Client::ShutdownRequested
&& !projectIsParsing(client->project())) {
// FIXME: Lots of const-incorrectness along the call chain of updateLanguageClient().
const auto project = const_cast<ProjectExplorer::Project *>(client->project());
ProjectExplorer::Project * const project = client->project();
updateLanguageClient(project, CppModelManager::instance()->projectInfo(project));
}
}