From 61574ee963a5c3f70ede89c1a7367db621164b6f Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 28 Oct 2020 19:30:19 +0100 Subject: [PATCH] Remove documentation for removed qHash overload QPair is an alias to std::pair in Qt 6, so no need for two qHash functions. Also remove note and snippet from std::pair overload documentation. Change-Id: Ica8f6961af1eac493e909ad06fe46f8f68542bc5 Reviewed-by: Paul Wicking --- .../doc/snippets/code/src_corelib_tools_qhash.cpp | 4 ---- src/corelib/tools/qhash.cpp | 15 --------------- 2 files changed, 19 deletions(-) diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp index 344fbb241db..77981075a23 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qhash.cpp @@ -335,10 +335,6 @@ inline size_t qHash(const std::unordered_set &key, size_t seed = 0) } //! [qhashrangecommutative] -//! [29] -qHash(qMakePair(key.first, key.second), seed); -//! [29] - //! [30] {0, 1, 2} //! [30] diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 06e211b9a24..9ca49f13eb4 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -713,16 +713,6 @@ uint qt_hash(QStringView key, uint chained) noexcept return h; } -/*! - \fn template size_t qHash(const QPair &key, size_t seed = 0) - \since 5.0 - \relates QHash - - Returns the hash value for the \a key, using \a seed to seed the calculation. - - Types \c T1 and \c T2 must be supported by qHash(). -*/ - /*! \fn template size_t qHash(const std::pair &key, size_t seed = 0) \since 5.7 @@ -731,11 +721,6 @@ uint qt_hash(QStringView key, uint chained) noexcept Returns the hash value for the \a key, using \a seed to seed the calculation. Types \c T1 and \c T2 must be supported by qHash(). - - \note The return type of this function is \e{not} the same as that of - \snippet code/src_corelib_tools_qhash.cpp 29 - The two functions use different hashing algorithms; due to binary compatibility - constraints, we cannot change the QPair algorithm to match the std::pair one before Qt 6. */ /*!