diff options
-rw-r--r-- | src/qmlcompiler/qqmljsmetatypes_p.h | 11 | ||||
-rw-r--r-- | src/qmlcompiler/qqmljsscope_p.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/qmlcompiler/qqmljsmetatypes_p.h b/src/qmlcompiler/qqmljsmetatypes_p.h index 8d63c7151a..89fdd7cd1b 100644 --- a/src/qmlcompiler/qqmljsmetatypes_p.h +++ b/src/qmlcompiler/qqmljsmetatypes_p.h @@ -167,13 +167,14 @@ class QQmlJSMetaProperty QString m_propertyName; QString m_typeName; QWeakPointer<const QQmlJSScope> m_type; - bool m_isList; - bool m_isWritable; - bool m_isPointer; - bool m_isAlias; - int m_revision; + bool m_isList = false; + bool m_isWritable = false; + bool m_isPointer = false; + bool m_isAlias = false; + int m_revision = 0; public: + QQmlJSMetaProperty() = default; QQmlJSMetaProperty(QString propertyName, QString typeName, bool isList, bool isWritable, bool isPointer, bool isAlias, int revision) diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h index 90696166e4..619fa09bd6 100644 --- a/src/qmlcompiler/qqmljsscope_p.h +++ b/src/qmlcompiler/qqmljsscope_p.h @@ -166,6 +166,7 @@ public: void addMethods(const QMultiHash<QString, QQmlJSMetaMethod> &methods) { m_methods.unite(methods); } void addMethod(const QQmlJSMetaMethod &method) { m_methods.insert(method.methodName(), method); } QMultiHash<QString, QQmlJSMetaMethod> methods() const { return m_methods; } + QQmlJSMetaMethod method(const QString &name) const { return m_methods.value(name); } void addEnum(const QQmlJSMetaEnum &fakeEnum) { m_enums.insert(fakeEnum.name(), fakeEnum); } QHash<QString, QQmlJSMetaEnum> enums() const { return m_enums; } @@ -190,6 +191,7 @@ public: void addProperty(const QQmlJSMetaProperty &prop) { m_properties.insert(prop.propertyName(), prop); } QHash<QString, QQmlJSMetaProperty> properties() const { return m_properties; } + QQmlJSMetaProperty property(const QString &name) const { return m_properties.value(name); } QString defaultPropertyName() const { return m_defaultPropertyName; } void setDefaultPropertyName(const QString &name) { m_defaultPropertyName = name; } |