forked from qt-creator/qt-creator
Clang: Request diagnostics/highlighting only if needed
Most of the time, the updated diagnostics/highlightings will be send by the backend on translation unit update. The other use case is changing the font settings (e.g. color), here we need to request the highlightings explicitly. Change-Id: I17a574eaf972c8bef12900241e7b33fe6ffd9dbd Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -193,7 +193,7 @@ void ModelManagerSupportClang::onCppDocumentReloadFinishedOnTranslationUnit(bool
|
||||
if (success) {
|
||||
TextEditor::TextDocument *textDocument = qobject_cast<TextEditor::TextDocument *>(sender());
|
||||
connectToTextDocumentContentsChangedForTranslationUnit(textDocument);
|
||||
m_ipcCommunicator.requestDiagnosticsAndHighlighting(textDocument);
|
||||
m_ipcCommunicator.updateTranslationUnitWithRevisionCheck(textDocument);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ void ModelManagerSupportClang::unregisterTranslationUnitsWithProjectParts(
|
||||
{
|
||||
const auto processors = clangProcessorsWithProjectParts(projectPartIds);
|
||||
foreach (ClangEditorDocumentProcessor *processor, processors) {
|
||||
m_ipcCommunicator.unregisterTranslationUnitsForEditor({processor->fileContainer()});
|
||||
m_ipcCommunicator.unregisterTranslationUnitsForEditor({processor->fileContainerWithArguments()});
|
||||
processor->clearProjectPart();
|
||||
processor->run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user