diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 52a1eedc3f..863e37605d 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -136,6 +136,11 @@ uint qHash(const QBitArray &bitArray, uint seed) return result; } +uint qHash(const QLatin1String &key, uint seed) +{ + return hash(reinterpret_cast(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 diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index e5606c6935..8fe66aac76 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -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 )