diff options
Diffstat (limited to 'src/corelib/tools/qhash.h')
-rw-r--r-- | src/corelib/tools/qhash.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 121ffa9fde..392371ce5e 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -51,6 +51,8 @@ #include <initializer_list> #include <functional> // for std::hash +class tst_QHash; // for befriending + QT_BEGIN_NAMESPACE struct QHashDummyValue @@ -680,7 +682,7 @@ struct Data } // return correct position of the next element - if (!spans[span].hasNode(index)) + if (bucket == numBuckets - 1 || !spans[span].hasNode(index)) ++it; return it; } @@ -740,6 +742,7 @@ class QHash using Data = QHashPrivate::Data<Node>; friend class QSet<Key>; friend class QMultiHash<Key, T>; + friend tst_QHash; Data *d = nullptr; |