diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2016-09-30 13:07:05 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2016-09-30 15:56:50 +0000 |
commit | 9ef524145c9ba796d1e34b3623cea3b0eaed5e3c (patch) | |
tree | b66c4201c531f24831f226b33b36d7bc406d2875 /src/lib/corelib/tools/error.h | |
parent | 8e58146a14e158252b503be08003a9b1fc2d9640 (diff) |
Fix "restoredWarnings" autotest
Depending on the platform, one of the warnings can appear more than
once. So let's not count duplicates.
Change-Id: Ic4778415418dc7898a54d07979d48941c1654c9a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/lib/corelib/tools/error.h')
-rw-r--r-- | src/lib/corelib/tools/error.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/corelib/tools/error.h b/src/lib/corelib/tools/error.h index 7ba94aae8..afab6aa54 100644 --- a/src/lib/corelib/tools/error.h +++ b/src/lib/corelib/tools/error.h @@ -43,13 +43,11 @@ #include "codelocation.h" #include <QExplicitlySharedDataPointer> +#include <QHash> #include <QList> #include <QMetaType> #include <QSharedDataPointer> - -QT_BEGIN_NAMESPACE -class QString; -QT_END_NAMESPACE +#include <QString> namespace qbs { namespace Internal { class PersistentPool; } @@ -109,6 +107,11 @@ private: QSharedDataPointer<ErrorInfoPrivate> d; }; +inline uint qHash(const ErrorInfo &e) { return qHash(e.toString()); } +inline bool operator==(const ErrorInfo &e1, const ErrorInfo &e2) { + return e1.toString() == e2.toString(); +} + } // namespace qbs Q_DECLARE_METATYPE(qbs::ErrorInfo) |