More qHash(T, uint) overloads for Qt types

The more we get in 5.0, the better.

Change-Id: If00084477709db4fc3f6b2e15024d046491be2ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Giuseppe D'Angelo 2012-03-24 18:23:49 +00:00 committed by Qt by Nokia
parent e6e4456de0
commit c3b9a67cf0
4 changed files with 9 additions and 9 deletions

View File

@ -3815,9 +3815,9 @@ struct QRegExpPrivate
};
#if !defined(QT_NO_REGEXP_OPTIM)
uint qHash(const QRegExpEngineKey &key)
uint qHash(const QRegExpEngineKey &key, uint seed)
{
return qHash(key.pattern);
return qHash(key.pattern, seed);
}
typedef QCache<QRegExpEngineKey, QRegExpEngine> EngineCache;

View File

@ -99,8 +99,8 @@ inline bool operator!=(const QDBusObjectPath &lhs, const QDBusObjectPath &rhs)
inline bool operator<(const QDBusObjectPath &lhs, const QDBusObjectPath &rhs)
{ return lhs.path() < rhs.path(); }
inline uint qHash(const QDBusObjectPath &objectPath)
{ return qHash(objectPath.path()); }
inline uint qHash(const QDBusObjectPath &objectPath, uint seed)
{ return qHash(objectPath.path(), seed); }
class Q_DBUS_EXPORT QDBusSignature
@ -146,8 +146,8 @@ inline bool operator!=(const QDBusSignature &lhs, const QDBusSignature &rhs)
inline bool operator<(const QDBusSignature &lhs, const QDBusSignature &rhs)
{ return lhs.signature() < rhs.signature(); }
inline uint qHash(const QDBusSignature &signature)
{ return qHash(signature.signature()); }
inline uint qHash(const QDBusSignature &signature, uint seed)
{ return qHash(signature.signature(), seed); }
class QDBusVariant
{

View File

@ -1027,9 +1027,9 @@ QDebug operator<<(QDebug d, const QHostAddress &address)
}
#endif
uint qHash(const QHostAddress &key)
uint qHash(const QHostAddress &key, uint seed)
{
return qHash(key.toString());
return qHash(key.toString(), seed);
}
#ifndef QT_NO_DATASTREAM

View File

@ -135,7 +135,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug, const QHostAddress &);
#endif
Q_NETWORK_EXPORT uint qHash(const QHostAddress &key);
Q_NETWORK_EXPORT uint qHash(const QHostAddress &key, uint seed = 0);
#ifndef QT_NO_DATASTREAM
Q_NETWORK_EXPORT QDataStream &operator<<(QDataStream &, const QHostAddress &);