aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsscope_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-06-18 15:19:25 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-07-09 14:47:13 +0200
commit905308491dfc0100ff8b289d64d42503d40ceeca (patch)
tree5fb2c04dedf577b2ecb6d09b9c24ded23224d677 /src/qmlcompiler/qqmljsscope_p.h
parenteb169146ceb8167214e0ea4f41b530fe8b2cc6a1 (diff)
Allow multiple bindings to the same property
We need that for list properties, and among those most default properties. Change-Id: I6aa1659548769654c6cbb18fd04db1cf62437f99 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsscope_p.h')
-rw-r--r--src/qmlcompiler/qqmljsscope_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h
index d2b7365ac5..929b9d6b96 100644
--- a/src/qmlcompiler/qqmljsscope_p.h
+++ b/src/qmlcompiler/qqmljsscope_p.h
@@ -232,7 +232,7 @@ public:
{
m_propertyBindings.insert(binding.propertyName(), binding);
}
- QHash<QString, QQmlJSMetaPropertyBinding> ownPropertyBindings() const
+ QMultiHash<QString, QQmlJSMetaPropertyBinding> ownPropertyBindings() const
{
return m_propertyBindings;
}
@@ -247,6 +247,7 @@ public:
bool hasPropertyBinding(const QString &name) const;
QQmlJSMetaPropertyBinding propertyBinding(const QString &name) const;
+ QList<QQmlJSMetaPropertyBinding> propertyBindings(const QString &name) const;
static QQmlJSScope::ConstPtr ownerOfProperty(const QQmlJSScope::ConstPtr &self,
const QString &name);
@@ -388,7 +389,7 @@ private:
QMultiHash<QString, QQmlJSMetaMethod> m_methods;
QHash<QString, QQmlJSMetaProperty> m_properties;
- QHash<QString, QQmlJSMetaPropertyBinding> m_propertyBindings;
+ QMultiHash<QString, QQmlJSMetaPropertyBinding> m_propertyBindings;
QHash<QString, QQmlJSMetaEnum> m_enumerations;
QVector<QQmlJSAnnotation> m_annotations;