diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2012-07-02 09:01:56 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-23 19:57:07 +0200 |
commit | 58ec01e278496bdaaee05546beb543a119de4277 (patch) | |
tree | 7a4437101eb0acaff913ad4696626b2b8cfa149d /src/corelib/tools/qhash.cpp | |
parent | acbfb4d777474aadd28136141082a8114d4310ac (diff) |
More qHash(T, uint) support
Add the seed to QPair, QUuid, QPersistentModelIndex's qHash(), and fix
qHash documentation for them and for many other datatypes.
Change-Id: I1386f3ed42ee1a832371a242ee5c82895ba92c2b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 106 |
1 files changed, 71 insertions, 35 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 0a6d51ced0..97f846c6c8 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -1,3 +1,4 @@ + /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). @@ -570,104 +571,139 @@ void QHashData::checkSanity() #endif /*! - \fn uint qHash(const QPair<T1, T2> &key) - \since 4.3 + \fn uint qHash(const QPair<T1, T2> &key, uint seed = 0) + \since 5.0 \relates QHash - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. Types \c T1 and \c T2 must be supported by qHash(). */ -/*! \fn uint qHash(char key) +/*! \fn uint qHash(char key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(uchar key) +/*! \fn uint qHash(uchar key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(signed char key) +/*! \fn uint qHash(signed char key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(ushort key) +/*! \fn uint qHash(ushort key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(short key) +/*! \fn uint qHash(short key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(uint key) +/*! \fn uint qHash(uint key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(int key) +/*! \fn uint qHash(int key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(ulong key) +/*! \fn uint qHash(ulong key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(long key) +/*! \fn uint qHash(long key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(quint64 key) +/*! \fn uint qHash(quint64 key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(qint64 key) +/*! \fn uint qHash(qint64 key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(QChar key) +/*! \fn uint qHash(QChar key, uint seed = 0) \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ /*! \fn uint qHash(const QByteArray &key, uint seed = 0) - \fn uint qHash(const QBitArray &key, uint seed = 0) - \fn uint qHash(const QString &key, uint seed = 0) - \fn uint qHash(const QStringRef &key, uint seed = 0) - \fn uint qHash(QLatin1String key, uint seed = 0) + \relates QHash + \since 5.0 + Returns the hash value for the \a key, using \a seed to seed the calculation. +*/ + +/*! \fn uint qHash(const QBitArray &key, uint seed = 0) \relates QHash \since 5.0 - Returns the hash value for the \a key, using \a seed to - seed the calculation. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ -/*! \fn uint qHash(const T *key) +/*! \fn uint qHash(const QString &key, uint seed = 0) \relates QHash + \since 5.0 + + Returns the hash value for the \a key, using \a seed to seed the calculation. +*/ + +/*! \fn uint qHash(const QStringRef &key, uint seed = 0) + \relates QHash + \since 5.0 + + Returns the hash value for the \a key, using \a seed to seed the calculation. +*/ + +/*! \fn uint qHash(QLatin1String key, uint seed = 0) + \relates QHash + \since 5.0 + + Returns the hash value for the \a key, using \a seed to seed the calculation. +*/ + +/*! \fn uint qHash(const T *key, uint seed = 0) + \relates QHash + \since 5.0 - Returns the hash value for the \a key. + Returns the hash value for the \a key, using \a seed to seed the calculation. */ /*! |