diff options
author | Liang Qi <liang.qi@qt.io> | 2019-12-16 12:35:38 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-12-16 13:54:41 +0100 |
commit | 8200c7500f5d1b7bf83742df903fea3f52e50fbf (patch) | |
tree | f83a76273e6f75e69abccb78f51f8ea9530773bc /tools/qmllint/scopetree.h | |
parent | bd18d2473f233b848d0d74a95b3dcf3a4297c044 (diff) |
qmllint: Use QHash::insert(QHash)
This amends 4f6815b29003e140be5ac5763429a4bb256f5b9f.
Change-Id: Icbe08d2c636969b40e7092b18c4bc2d21476944a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools/qmllint/scopetree.h')
-rw-r--r-- | tools/qmllint/scopetree.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/qmllint/scopetree.h b/tools/qmllint/scopetree.h index d6f0a2c171..b7619c4352 100644 --- a/tools/qmllint/scopetree.h +++ b/tools/qmllint/scopetree.h @@ -132,11 +132,7 @@ public: ScopeType scopeType() const { return m_scopeType; } - 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 addMethods(const QHash<QString, MetaMethod> &methods) { m_methods.insert(methods); } void addMethod(const MetaMethod &method) { m_methods.insert(method.methodName(), method); } QHash<QString, MetaMethod> methods() const { return m_methods; } |