ClangTools: Add diagnostic mark class

These marks can now be disabled.
This greys out the annotation color and the icon of the mark.

Change-Id: I5af4591db4baaaef55c986252f77d5d977427b56
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-07-21 13:11:01 +02:00
parent 4314795992
commit 7f562c4d33
11 changed files with 258 additions and 129 deletions

View File

@@ -27,6 +27,8 @@
#include <cpptools/clangdiagnosticconfig.h>
#include <utils/optional.h>
#include <QtGlobal>
QT_BEGIN_NAMESPACE
@@ -39,6 +41,22 @@ namespace Debugger { class DiagnosticLocation; }
namespace ClangTools {
namespace Internal {
class Diagnostic;
enum class FixitStatus {
NotAvailable,
NotScheduled,
Scheduled,
Applied,
FailedToApply,
Invalidated,
};
QString createDiagnosticToolTipString(
const Diagnostic &diagnostic,
Utils::optional<FixitStatus> status = Utils::nullopt,
bool showSteps = true);
QString createFullLocationString(const Debugger::DiagnosticLocation &location);
QString hintAboutBuildBeforeAnalysis();