From c0b1230108090cf914ccc5329b1213063ed21bdd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 18 Oct 2018 22:52:13 -0700 Subject: Add qHash(QCborTag) and qHash(QCborSimpleType) Needed in qHash(QCborValue). Change-Id: If7e743cf8476463880ccfffd155eeca91369b356 Reviewed-by: Ulf Hermann Reviewed-by: Edward Welbourne --- src/corelib/serialization/qcborcommon.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/corelib/serialization/qcborcommon.h') diff --git a/src/corelib/serialization/qcborcommon.h b/src/corelib/serialization/qcborcommon.h index 9661cd70bb..f8278f1649 100644 --- a/src/corelib/serialization/qcborcommon.h +++ b/src/corelib/serialization/qcborcommon.h @@ -133,6 +133,16 @@ Q_CORE_EXPORT QDebug operator<<(QDebug, QCborKnownTags tg); Q_CORE_EXPORT QDebug operator<<(QDebug, QCborTag tg); #endif +inline uint qHash(QCborSimpleType tag, uint seed = 0) +{ + return qHash(quint8(tag), seed); +} + +inline uint qHash(QCborTag tag, uint seed = 0) +{ + return qHash(quint64(tag), seed); +} + QT_END_NAMESPACE Q_DECLARE_METATYPE(QCborTag) -- cgit v1.2.3