ClangTools: Add QuickFixes to the editor

Change-Id: I9862231f0aa8e8274e8529e57e80eac5ececded9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
David Schulz
2020-08-25 06:18:26 +02:00
parent b55a313b3d
commit ef10f3b937
14 changed files with 284 additions and 12 deletions

View File

@@ -25,6 +25,7 @@
#include "diagnosticmark.h"
#include "clangtoolsconstants.h"
#include "clangtoolsutils.h"
#include <utils/utilsicons.h>
@@ -35,7 +36,7 @@ namespace Internal {
DiagnosticMark::DiagnosticMark(const Diagnostic &diagnostic)
: TextEditor::TextMark(Utils::FilePath::fromString(diagnostic.location.filePath),
diagnostic.location.line,
Utils::Id("ClangTool.DiagnosticMark"))
Utils::Id(Constants::DIAGNOSTIC_MARK_ID))
, m_diagnostic(diagnostic)
{
if (diagnostic.type == "error" || diagnostic.type == "fatal")
@@ -67,6 +68,11 @@ bool DiagnosticMark::enabled() const
return m_enabled;
}
Diagnostic DiagnosticMark::diagnostic() const
{
return m_diagnostic;
}
} // namespace Internal
} // namespace ClangTools