aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangtools/clangtoolsdiagnostic.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <[email protected]>2019-11-04 14:44:36 +0100
committerNikolai Kosjar <[email protected]>2019-12-04 14:07:04 +0000
commit07ec6de8d94e1498407158525baba4be441a791c (patch)
tree78f7fd864dcd7857f86e020c7485871501c928b4 /src/plugins/clangtools/clangtoolsdiagnostic.cpp
parent92bb42dd36394162a9badecf029234e1c343b5a7 (diff)
ClangTools: Improve filtering
Replace the filter line edit in the toolbar by a tool button that pop ups a dialog. In the dialog, the available checkers can be selectd/unselected to filter the diagnostic view. Also, the diagnostic view can be limited to diagnostics with fixits so that these can be selected and applied as the next step. For convience, add also some context menu entries to modify the filter with regard to the current diagnostic. Change-Id: Ifba3028805840658d72a39516c2b02da9864d4a6 Reviewed-by: Cristian Adam <[email protected]>
Diffstat (limited to 'src/plugins/clangtools/clangtoolsdiagnostic.cpp')
-rw-r--r--src/plugins/clangtools/clangtoolsdiagnostic.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/clangtools/clangtoolsdiagnostic.cpp b/src/plugins/clangtools/clangtoolsdiagnostic.cpp
index 5e850659bf5..1623d2f6b45 100644
--- a/src/plugins/clangtools/clangtoolsdiagnostic.cpp
+++ b/src/plugins/clangtools/clangtoolsdiagnostic.cpp
@@ -49,7 +49,8 @@ bool Diagnostic::isValid() const
quint32 qHash(const Diagnostic &diagnostic)
{
- return qHash(diagnostic.description)
+ return qHash(diagnostic.name)
+ ^ qHash(diagnostic.description)
^ qHash(diagnostic.location.filePath)
^ diagnostic.location.line
^ diagnostic.location.column;
@@ -57,7 +58,8 @@ quint32 qHash(const Diagnostic &diagnostic)
bool operator==(const Diagnostic &lhs, const Diagnostic &rhs)
{
- return lhs.description == rhs.description
+ return lhs.name == rhs.name
+ && lhs.description == rhs.description
&& lhs.category == rhs.category
&& lhs.type == rhs.type
&& lhs.location == rhs.location