forked from qt-creator/qt-creator
Clang: Refactor handling of diagnostics
...by introducing ClangDiagnosticManager and the helper class ClangDiagnosticFilter. ClangDiagnosticManager will get more state in a follow-up change. Change-Id: Id2c312bc897ea41ed67292b56b24dcfb7975ff4a Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -31,8 +31,8 @@
|
||||
#ifndef CLANGEDITORDOCUMENTPROCESSOR_H
|
||||
#define CLANGEDITORDOCUMENTPROCESSOR_H
|
||||
|
||||
#include "clangdiagnosticmanager.h"
|
||||
#include "clangeditordocumentparser.h"
|
||||
#include "clangtextmark.h"
|
||||
|
||||
#include <cpptools/baseeditordocumentprocessor.h>
|
||||
#include <cpptools/builtineditordocumentprocessor.h>
|
||||
@@ -41,8 +41,6 @@
|
||||
#include <QFutureWatcher>
|
||||
#include <QPointer>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace ClangBackEnd {
|
||||
class DiagnosticContainer;
|
||||
}
|
||||
@@ -85,15 +83,12 @@ private slots:
|
||||
private:
|
||||
void updateProjectPartAndTranslationUnitForEditor();
|
||||
void updateTranslationUnitForEditor(CppTools::ProjectPart &projectPart);
|
||||
QList<QTextEdit::ExtraSelection>
|
||||
generateDiagnosticHints(const QVector<ClangBackEnd::DiagnosticContainer> &diagnostics);
|
||||
void addClangTextMarks(const std::vector<ClangBackEnd::DiagnosticContainer> &diagnostics);
|
||||
void requestDiagnostics(CppTools::ProjectPart &projectPart);
|
||||
void requestDiagnostics();
|
||||
|
||||
private:
|
||||
ClangDiagnosticManager m_diagnosticManager;
|
||||
QPointer<ModelManagerSupportClang> m_modelManagerSupport;
|
||||
std::vector<ClangTextMark> m_clangTextMarks;
|
||||
QSharedPointer<ClangEditorDocumentParser> m_parser;
|
||||
CppTools::ProjectPart::Ptr m_projectPart;
|
||||
QFutureWatcher<void> m_parserWatcher;
|
||||
|
||||
Reference in New Issue
Block a user