forked from qt-creator/qt-creator
ClangTools: Support loading exported diagnostics
Add a new toolbar button to load diagnostics exported with $ clang-tidy -export-fixes=/path/to/file $ clazy-standalone -export-fixes=/path/to/file (master version) Change-Id: I8316fe0706a18222e68220ef4fbfdc7ae8d09804 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -33,6 +33,15 @@ bool ExplainingStep::isValid() const
|
||||
return location.isValid() && !ranges.isEmpty() && !message.isEmpty();
|
||||
}
|
||||
|
||||
bool operator==(const ExplainingStep &lhs, const ExplainingStep &rhs)
|
||||
{
|
||||
return lhs.message == rhs.message
|
||||
&& lhs.location == rhs.location
|
||||
&& lhs.ranges == rhs.ranges
|
||||
&& lhs.isFixIt == rhs.isFixIt
|
||||
;
|
||||
}
|
||||
|
||||
bool Diagnostic::isValid() const
|
||||
{
|
||||
return !description.isEmpty();
|
||||
@@ -46,5 +55,16 @@ quint32 qHash(const Diagnostic &diagnostic)
|
||||
^ diagnostic.location.column;
|
||||
}
|
||||
|
||||
bool operator==(const Diagnostic &lhs, const Diagnostic &rhs)
|
||||
{
|
||||
return lhs.description == rhs.description
|
||||
&& lhs.category == rhs.category
|
||||
&& lhs.type == rhs.type
|
||||
&& lhs.location == rhs.location
|
||||
&& lhs.explainingSteps == rhs.explainingSteps
|
||||
&& lhs.hasFixits == rhs.hasFixits
|
||||
;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ClangTools
|
||||
|
||||
Reference in New Issue
Block a user