summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2021-07-07 14:22:13 +0200
committerIvan Solovev <ivan.solovev@qt.io>2021-07-08 20:12:14 +0200
commita8bcf68a5ec91b4ca4209c36310def145c8afe97 (patch)
treed8287e216c4a62ccbd7438571b97782ad7126007 /src/corelib/tools
parent15592ec4f7dcf42c529b99eda2a7ec2520d5a431 (diff)
Fix QMultiHash::keys(const T&) overload
The method was never tested, but it failed to compile after QMultiHash was introduced as a separate class in 6.0. This patch fixes it and adds some unit-tests to cover the case. Task-number: QTBUG-91736 Pick-to: 6.2 6.1 Change-Id: I5dd989d4775efc6a9bb13c5ed1d892e499d95dc2 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qhash.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 6866dfebf3..b030fd2a93 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -1458,7 +1458,7 @@ public:
QList<Key> res;
const_iterator i = begin();
while (i != end()) {
- if (i.value()->contains(value))
+ if (i.value() == value)
res.append(i.key());
++i;
}