LanguageClient: announce opened projects just once

... and not on every file list change.

Change-Id: Id74aceb5bb382c01746eca0e014da72e2260b8d8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2021-11-30 14:28:54 +01:00
parent d62d0f305b
commit cc7619804e

View File

@@ -593,9 +593,6 @@ void LanguageClientManager::updateProject(ProjectExplorer::Project *project)
}
}
}
const QVector<Client *> &clients = reachableClients();
for (Client *client : clients)
client->projectOpened(project);
}
void LanguageClientManager::projectAdded(ProjectExplorer::Project *project)
@@ -603,6 +600,9 @@ void LanguageClientManager::projectAdded(ProjectExplorer::Project *project)
connect(project, &ProjectExplorer::Project::fileListChanged, this, [this, project]() {
updateProject(project);
});
const QVector<Client *> &clients = reachableClients();
for (Client *client : clients)
client->projectOpened(project);
}
} // namespace LanguageClient