summaryrefslogtreecommitdiff
path: root/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-02-19 18:08:38 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-02-27 11:39:32 +0200
commit6e796591f445aa0f193b280b9c89fcf82fa2236d (patch)
treebcbd01ee08d56ca6964b90c303768b5a2b4ffa39 /plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.h
parenta13818f5cd3e8e60954dc75483834965926553fc (diff)
downloadqt-creator-6e796591f445aa0f193b280b9c89fcf82fa2236d.tar.gz
Allow users to suppress diagnostics.
This patch deals with what is likely the most common use case: Filtering specific messages at a particular location. The current granularity is essentially per-file (and per-function, where possible), which seems more useful than taking line numbers into account, as that would not be robust with regards to code changes elsewhere in the file. We can fine-tune this if the need arises. Change-Id: I4e9b2671fa199339cc3b995953d072b840cd3205 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.h')
-rw-r--r--plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.h b/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.h
index ed6acae4f3..4fbdc7f866 100644
--- a/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.h
+++ b/plugins/clangstaticanalyzer/clangstaticanalyzerdiagnosticview.h
@@ -23,6 +23,7 @@
namespace ClangStaticAnalyzer {
namespace Internal {
+class Diagnostic;
class ClangStaticAnalyzerDiagnosticView : public Analyzer::DetailedErrorView
{
@@ -30,6 +31,13 @@ class ClangStaticAnalyzerDiagnosticView : public Analyzer::DetailedErrorView
public:
ClangStaticAnalyzerDiagnosticView(QWidget *parent = 0);
+
+private:
+ void suppressCurrentDiagnostic();
+
+ QList<QAction *> customActions() const;
+
+ QAction *m_suppressAction;
};
class ClangStaticAnalyzerDiagnosticDelegate : public Analyzer::DetailedErrorDelegate
@@ -38,6 +46,7 @@ public:
ClangStaticAnalyzerDiagnosticDelegate(QListView *parent);
SummaryLineInfo summaryInfo(const QModelIndex &index) const;
+ Diagnostic getDiagnostic(const QModelIndex &index) const;
private:
QWidget *createDetailsWidget(const QFont &font, const QModelIndex &index,