summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2018-10-18 22:52:13 -0700
committerThiago Macieira <thiago.macieira@intel.com>2018-11-08 15:19:43 +0000
commitc0b1230108090cf914ccc5329b1213063ed21bdd (patch)
tree78274515123d1544c95ca984795dcf541a39898b /src/corelib/serialization
parent75e8f6f41e0c436c257eec543684f5e8d47213f4 (diff)
Add qHash(QCborTag) and qHash(QCborSimpleType)
Needed in qHash(QCborValue). Change-Id: If7e743cf8476463880ccfffd155eeca91369b356 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/serialization')
-rw-r--r--src/corelib/serialization/qcborcommon.h10
1 files changed, 10 insertions, 0 deletions
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)