qHash: qHash(T*) two arguments support

Change-Id: I1b78914fe9c6ee9251d68af1f2e95f1e3e0f1db5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Giuseppe D'Angelo 2012-04-10 21:28:10 +01:00 committed by Qt by Nokia
parent 67d7f55db6
commit a8ceb73b93

View File

@ -95,9 +95,9 @@ Q_CORE_EXPORT uint qt_hash(const QString &key);
#pragma warning( push )
#pragma warning( disable : 4311 ) // disable pointer truncation warning
#endif
template <class T> inline uint qHash(const T *key)
template <class T> inline uint qHash(const T *key, uint seed = 0)
{
return qHash(reinterpret_cast<quintptr>(key));
return qHash(reinterpret_cast<quintptr>(key), seed);
}
#if defined(Q_CC_MSVC)
#pragma warning( pop )