forked from qt-creator/qt-creator
LanguageClient: track clients scheduled for deletion
So report an async shutdown if we have clients scheduled for deletion and wait until all clients have been fully deleted. Change-Id: I40d35d3429003ab2a5c68cb81486c3e16b5f6f63 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -48,6 +48,7 @@ public:
|
||||
static void deleteClient(Client *client);
|
||||
|
||||
static void shutdown();
|
||||
static bool isShutdownFinished();
|
||||
|
||||
static LanguageClientManager *instance();
|
||||
|
||||
@@ -96,6 +97,8 @@ private:
|
||||
void updateProject(ProjectExplorer::Project *project);
|
||||
void projectAdded(ProjectExplorer::Project *project);
|
||||
|
||||
void trackClientDeletion(Client *client);
|
||||
|
||||
QList<Client *> reachableClients();
|
||||
|
||||
QList<Client *> m_clients;
|
||||
@@ -105,6 +108,7 @@ private:
|
||||
QHash<TextEditor::TextDocument *, QPointer<Client>> m_clientForDocument;
|
||||
std::unique_ptr<LanguageClientManagerPrivate> d;
|
||||
LspInspector m_inspector;
|
||||
QSet<Utils::Id> m_scheduledForDeletion;
|
||||
};
|
||||
|
||||
template<typename T> bool LanguageClientManager::hasClients()
|
||||
|
||||
Reference in New Issue
Block a user