Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <QtCore/qstring.h>
#include <QtCore/qstringfwd.h>
#include <numeric>
#include <functional>
#include <utility>
Go to the source code of this file.
Namespaces | |
namespace | QHashPrivate |
namespace | QtPrivate |
\macro QT_NO_KEYWORDS > | |
Macros | |
#define | QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH(Class, Arguments) |
#define | QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_CREF(Class) QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH(Class, const argument_type &) |
#define | QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_VALUE(Class) QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH(Class, argument_type) |
Typedefs | |
template<typename... T> | |
using | QtPrivate::QHashMultiReturnType |
Functions | |
Q_DECL_CONST_FUNCTION constexpr size_t | QHashPrivate::hash (size_t key, size_t seed) noexcept |
template<typename T1 , typename T2 > | |
static constexpr bool | QHashPrivate::noexceptPairHash () |
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION size_t | qHashBits (const void *p, size_t size, size_t seed=0) noexcept |
template<typename T1 , typename T2 > | |
size_t | qHash (const std::pair< T1, T2 > &key, size_t seed=0) noexcept(QHashPrivate::noexceptPairHash< T1, T2 >()) |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (char key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (uchar key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (signed char key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (ushort key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (short key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (uint key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (int key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (ulong key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (long key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (quint64 key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (qint64 key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION size_t | qHash (float key, size_t seed=0) noexcept |
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION size_t | qHash (double key, size_t seed=0) noexcept |
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION size_t | qHash (long double key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (wchar_t key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (char16_t key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (char32_t key, size_t seed=0) noexcept |
template<class T > | |
size_t | qHash (const T *key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (std::nullptr_t, size_t seed=0) noexcept |
template<class Enum , std::enable_if_t< std::is_enum_v< Enum >, bool > = true> | |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (Enum e, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (const QChar key, size_t seed=0) noexcept |
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION size_t | qHash (QByteArrayView key, size_t seed=0) noexcept |
Q_DECL_PURE_FUNCTION size_t | qHash (const QByteArray &key, size_t seed=0 QT6_DECL_NEW_OVERLOAD_TAIL) noexcept |
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION size_t | qHash (QStringView key, size_t seed=0) noexcept |
Q_DECL_PURE_FUNCTION size_t | qHash (const QString &key, size_t seed=0) noexcept |
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION size_t | qHash (const QBitArray &key, size_t seed=0) noexcept |
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION size_t | qHash (QLatin1StringView key, size_t seed=0) noexcept |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (QKeyCombination key, size_t seed=0) noexcept |
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION uint | qt_hash (QStringView key, uint chained=0) noexcept |
template<typename Enum > | |
Q_DECL_CONST_FUNCTION constexpr size_t | qHash (QFlags< Enum > flags, size_t seed=0) noexcept |
template<typename T > | |
bool | qHashEquals (const T &a, const T &b) |
template<typename T1 , typename T2 > | |
std::enable_if_t< QHashPrivate::HeterogeneouslySearchableWith< T1, T2 >, bool > | qHashEquals (const T1 &a, const T2 &b) |
template<typename... T> | |
constexpr QtPrivate::QHashMultiReturnType< T... > | qHashMulti (size_t seed, const T &... args) noexcept(std::conjunction_v< QtPrivate::QNothrowHashable< T >... >) |
template<typename... T> | |
constexpr QtPrivate::QHashMultiReturnType< T... > | qHashMultiCommutative (size_t seed, const T &... args) noexcept(std::conjunction_v< QtPrivate::QNothrowHashable< T >... >) |
template<typename InputIterator > | |
size_t | qHashRange (InputIterator first, InputIterator last, size_t seed=0) noexcept(noexcept(qHash(*first))) |
template<typename InputIterator > | |
size_t | qHashRangeCommutative (InputIterator first, InputIterator last, size_t seed=0) noexcept(noexcept(qHash(*first))) |
Variables | |
template<typename Key , typename T > | |
constexpr bool | QHashPrivate::HeterogeneouslySearchableWith = false |
template<typename T > | |
constexpr bool | QtPrivate::QNothrowHashableHelper_v = noexcept(qHash(std::declval<const T &>())) |
template<typename T > | |
constexpr bool | QtPrivate::QNothrowHashable_v = QNothrowHashable<T>::value |
#define QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH | ( | Class, | |
Arguments ) |
Definition at line 371 of file qhashfunctions.h.
#define QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_CREF | ( | Class | ) | QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH(Class, const argument_type &) |
Definition at line 394 of file qhashfunctions.h.
#define QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH_BY_VALUE | ( | Class | ) | QT_SPECIALIZE_STD_HASH_TO_CALL_QHASH(Class, argument_type) |
Definition at line 396 of file qhashfunctions.h.
|
related |
Definition at line 101 of file qhashfunctions.h.
|
related |
Definition at line 170 of file qhashfunctions.h.
|
related |
Definition at line 172 of file qhashfunctions.h.
|
related |
|
related |
Definition at line 198 of file qhashfunctions.h.
|
related |
Definition at line 191 of file qhashfunctions.h.
|
related |
Definition at line 204 of file qhashfunctions.h.
|
related |
Definition at line 365 of file qhashfunctions.h.
Referenced by QHash< Key, T >::qHash(), QHash< Key, T >::qHash(), QHash< Key, T >::qHash(), QHash< Key, T >::qHash(), qHash(), QHash< Key, T >::qHash(), and qHash().
|
related |
Definition at line 178 of file qhashfunctions.h.
|
related |
|
inlineconstexprnoexcept |
Definition at line 187 of file qhashfunctions.h.
References QHashPrivate::hash(), qToUnderlying(), and seed.
|
related |
Definition at line 158 of file qhashfunctions.h.
|
related |
Definition at line 113 of file qhashfunctions.h.
|
related |
|
related |
Definition at line 117 of file qhashfunctions.h.
|
noexcept |
Definition at line 1114 of file qhash.cpp.
References qHashBits(), and seed.
|
inlineconstexprnoexcept |
|
related |
Definition at line 125 of file qhashfunctions.h.
|
inlineconstexprnoexcept |
|
related |
|
related |
|
related |
Definition at line 119 of file qhashfunctions.h.
|
related |
Definition at line 109 of file qhashfunctions.h.
|
related |
Definition at line 105 of file qhashfunctions.h.
|
related |
Definition at line 182 of file qhashfunctions.h.
|
related |
Definition at line 103 of file qhashfunctions.h.
|
related |
Definition at line 111 of file qhashfunctions.h.
|
related |
Definition at line 115 of file qhashfunctions.h.
|
related |
Definition at line 107 of file qhashfunctions.h.
|
related |
Definition at line 168 of file qhashfunctions.h.
|
related |
Definition at line 1089 of file qhash.cpp.
Referenced by QTlsPrivate::X509CertificateOpenSSL::hash(), qHash(), qHash(), qHash(), qHash(), qHash(), and QStringView::qHash().
|
related |
Definition at line 256 of file qhashfunctions.h.
Referenced by QHashPrivate::Data< Node >::findBucket().
std::enable_if_t< QHashPrivate::HeterogeneouslySearchableWith< T1, T2 >, bool > qHashEquals | ( | const T1 & | a, |
const T2 & | b ) |
Definition at line 263 of file qhashfunctions.h.
|
related |
Definition at line 322 of file qhashfunctions.h.
Referenced by QGeoCirclePrivate::hash(), QGeoPathPrivate::hash(), QGeoPolygonPrivate::hash(), QGeoRectanglePrivate::hash(), qHash(), QByteArray::FromBase64Result::qHash(), qHash(), qHash(), qHash(), QGeoAddress::qHash(), QGeoLocation::qHash(), qHash(), qHash(), qHash(), qHash(), QShaderKey::qHash(), qHash(), qHash(), QHash< Key, T >::qHash(), and QHash< Key, T >::qHash().
|
related |
Definition at line 336 of file qhashfunctions.h.
|
related |
Definition at line 344 of file qhashfunctions.h.
Referenced by QVLABase< T >::hash(), QGeoPathPrivate::hash(), QGeoPolygonPrivate::hash(), qHash(), qHash(), qHash(), and qHash().
|
related |
Definition at line 351 of file qhashfunctions.h.
Referenced by qHash().
|
noexcept |
Private copy of the implementation of the Qt 4 qHash algorithm for strings, (that is, QChar-based arrays, so all QString-like classes), to be used wherever the result is somehow stored or reused across multiple Qt versions. The public qHash implementation can change at any time, therefore one must not rely on the fact that it will always give the same results.
The qt_hash functions must never change their results.
This function can hash discontiguous memory by invoking it on each chunk, passing the previous's result in the next call's chained argument.
Definition at line 1325 of file qhash.cpp.
Referenced by qt_rcc_compare_hash::operator()(), and RCCFileInfo::writeDataName().