diff options
Diffstat (limited to 'src/corelib/plugin/quuid.cpp')
-rw-r--r-- | src/corelib/plugin/quuid.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp index eb29e6eba8..6fca1b6709 100644 --- a/src/corelib/plugin/quuid.cpp +++ b/src/corelib/plugin/quuid.cpp @@ -441,6 +441,7 @@ QUuid QUuid::fromRfc4122(const QByteArray &bytes) #ifndef QT_NO_QUUID_STRING /*! \fn QUuid::operator QString() const + \obsolete Returns the string representation of the uuid. @@ -926,4 +927,15 @@ QUuid QUuid::createUuid() guid; otherwise returns false. */ +/** + Returns a hash of the QUuid + */ +uint qHash(const QUuid &uuid) +{ + return uuid.data1 ^ uuid.data2 ^ (uuid.data3 << 16) + ^ ((uuid.data4[0] << 24) | (uuid.data4[1] << 16) | (uuid.data4[2] << 8) | uuid.data4[3]) + ^ ((uuid.data4[4] << 24) | (uuid.data4[5] << 16) | (uuid.data4[6] << 8) | uuid.data4[7]); +} + + QT_END_NAMESPACE |