QLatin1String: add qHash overload
It was never introduced in Qt 4, probably because of the implicit conversion to QString (that is, adding the qHash overload for QLatin1String in Qt 4 would have been a BIC). Change-Id: I2ebc8e73a85be497866820e0ca416dd11167bb53 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
parent
2d89850b23
commit
538386f36f
@ -136,6 +136,11 @@ uint qHash(const QBitArray &bitArray, uint seed)
|
||||
return result;
|
||||
}
|
||||
|
||||
uint qHash(const QLatin1String &key, uint seed)
|
||||
{
|
||||
return hash(reinterpret_cast<const uchar *>(key.data()), key.size(), seed);
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
@ -618,6 +623,7 @@ void QHashData::checkSanity()
|
||||
\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(const QLatin1String &key, uint seed = 0)
|
||||
|
||||
\relates QHash
|
||||
\since 5.0
|
||||
|
@ -88,6 +88,7 @@ Q_CORE_EXPORT uint qHash(const QByteArray &key, uint seed = 0);
|
||||
Q_CORE_EXPORT uint qHash(const QString &key, uint seed = 0);
|
||||
Q_CORE_EXPORT uint qHash(const QStringRef &key, uint seed = 0);
|
||||
Q_CORE_EXPORT uint qHash(const QBitArray &key, uint seed = 0);
|
||||
Q_CORE_EXPORT uint qHash(const QLatin1String &key, uint seed = 0);
|
||||
|
||||
#if defined(Q_CC_MSVC)
|
||||
#pragma warning( push )
|
||||
|
Loading…
Reference in New Issue
Block a user