aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-12-13 09:06:05 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-12-13 11:45:54 +0100
commit4f6815b29003e140be5ac5763429a4bb256f5b9f (patch)
treedbc87ea041c6ef464b580e1eb6fb1c0833554c79 /tools
parenta7325668a2d6c687f246ab142e20aa93889744e9 (diff)
qmllint: Avoid QHash::unite()
As we don't have QHash::insert(QHash), yet, we have to iterate for now. Change-Id: I3deaf8c0fb53446bb9f125786d20ed89abe85c42 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmllint/scopetree.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/qmllint/scopetree.h b/tools/qmllint/scopetree.h
index 4b0d4a9539..d6f0a2c171 100644
--- a/tools/qmllint/scopetree.h
+++ b/tools/qmllint/scopetree.h
@@ -132,7 +132,11 @@ public:
ScopeType scopeType() const { return m_scopeType; }
- void addMethods(const QHash<QString, MetaMethod> &methods) { m_methods.unite(methods); }
+ void addMethods(const QHash<QString, MetaMethod> &methods)
+ {
+ for (auto it = methods.begin(), end = methods.end(); it != end; ++it)
+ m_methods.insert(it.key(), it.value());
+ }
void addMethod(const MetaMethod &method) { m_methods.insert(method.methodName(), method); }
QHash<QString, MetaMethod> methods() const { return m_methods; }