From 37e91af0830b4f651a669a8203b40191998e3c86 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 16 Jul 2018 15:21:28 +0200 Subject: [PATCH] QHash: Remove reference to Qt3's QDict implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While it is still formally correct, it does not add much value anymore. Change-Id: I32431e3e73f3ca662dc4beb754f53449692c56a9 Reviewed-by: Albert Astals Cid Reviewed-by: Andy Shaw Reviewed-by: Topi Reiniƶ --- src/corelib/tools/qhash.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 5f0b131342..8d2616865e 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -1100,9 +1100,8 @@ uint qHash(long double key, uint seed) Q_DECL_NOTHROW To avoid this problem, replace \c hash[i] with \c hash.value(i) in the code above. - Internally, QHash uses a hash table to perform lookups. Unlike Qt - 3's \c QDict class, which needed to be initialized with a prime - number, QHash's hash table automatically grows and shrinks to + Internally, QHash uses a hash table to perform lookups. This + hash table automatically grows and shrinks to provide fast lookups without wasting too much memory. You can still control the size of the hash table by calling reserve() if you already know approximately how many items the QHash will