ClangCodeModel: Work around race condition when closing editors

The editor manager emits currentEditorChanged() before editorsClosed(),
which throws off the clangbackend. Fix this by sending an extra
DocumentVisibilityChangedMessage after the DocumentsClosedMessage.

Fixes: QTCREATORBUG-25193
Change-Id: Ic02ae174a2912d79aeded44ced13d962b53526b1
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-01-08 12:44:07 +01:00
parent 000268e40c
commit 47dfc16eee

View File

@@ -478,6 +478,7 @@ void BackendCommunicator::documentsClosed(const FileContainers &fileContainers)
{
const DocumentsClosedMessage message(fileContainers);
m_sender->documentsClosed(message);
documentVisibilityChanged(); // QTCREATORBUG-25193
}
void BackendCommunicator::unsavedFilesUpdated(const FileContainers &fileContainers)