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 <cristian.adam@qt.io>
This commit is contained in:
Nikolai Kosjar
2019-11-04 14:44:36 +01:00
parent 92bb42dd36
commit 07ec6de8d9
15 changed files with 554 additions and 62 deletions

View File

@@ -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