ClangCodeModel: Fix issue pane management for clangd diagnostics

We basically forgot to implement this. A task in the issues pane was
created for every text mark, but there was no code to deal with handling
editor switches, resulting in seemingly random behavior.

Fixes: QTCREATORBUG-27260
Change-Id: Ifcc1e04db4c37dde7e80f0e1646dc7c557cd7481
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2022-05-11 12:30:57 +02:00
parent 7881a49e7d
commit 35963fd2b8
5 changed files with 61 additions and 17 deletions

View File

@@ -282,8 +282,10 @@ void ClangModelManagerSupport::onCurrentEditorChanged(Core::IEditor *editor)
const ::Utils::FilePath filePath = editor->document()->filePath();
if (auto processor = ClangEditorDocumentProcessor::get(filePath.toString())) {
processor->semanticRehighlight();
if (const auto client = clientForFile(filePath))
if (const auto client = clientForFile(filePath)) {
client->updateParserConfig(filePath, processor->parserConfig());
client->switchIssuePaneEntries(filePath);
}
}
}