forked from qt-creator/qt-creator
ClangTools: Let users disable checks from text marks
Fixes: QTCREATORBUG-25622 Change-Id: Ied5ca0fca65cd12a2df7744ffc2043dc9686c973 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "clangtoolsconstants.h"
|
||||
#include "clangtoolsutils.h"
|
||||
#include "diagnosticconfigswidget.h"
|
||||
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
@@ -68,6 +69,13 @@ DiagnosticMark::DiagnosticMark(const Diagnostic &diagnostic)
|
||||
});
|
||||
actions << action;
|
||||
|
||||
// Disable diagnostic action
|
||||
action = new QAction();
|
||||
action->setIcon(Utils::Icons::BROKEN.icon());
|
||||
action->setToolTip(tr("Disable Diagnostic"));
|
||||
QObject::connect(action, &QAction::triggered, [diagnostic] { disableChecks({diagnostic}); });
|
||||
actions << action;
|
||||
|
||||
setActions(actions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user