diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/qmlcompiler/qqmljsmetatypes_p.h | 8 | ||||
| -rw-r--r-- | src/qmlcompiler/qqmljstypedescriptionreader.cpp | 11 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/qmlcompiler/qqmljsmetatypes_p.h b/src/qmlcompiler/qqmljsmetatypes_p.h index bdcb4d7c1a..661344bd5c 100644 --- a/src/qmlcompiler/qqmljsmetatypes_p.h +++ b/src/qmlcompiler/qqmljsmetatypes_p.h @@ -242,6 +242,8 @@ class QQmlJSMetaProperty { QString m_propertyName; QString m_typeName; + QString m_read; + QString m_write; QString m_bindable; QWeakPointer<const QQmlJSScope> m_type; QVector<QQmlJSAnnotation> m_annotations; @@ -260,6 +262,12 @@ public: void setTypeName(const QString &typeName) { m_typeName = typeName; } QString typeName() const { return m_typeName; } + void setRead(const QString &read) { m_read = read; } + QString read() const { return m_read; } + + void setWrite(const QString &write) { m_write = write; } + QString write() const { return m_write; } + void setBindable(const QString &bindable) { m_bindable = bindable; } QString bindable() const { return m_bindable; } diff --git a/src/qmlcompiler/qqmljstypedescriptionreader.cpp b/src/qmlcompiler/qqmljstypedescriptionreader.cpp index b97e823623..61587e818c 100644 --- a/src/qmlcompiler/qqmljstypedescriptionreader.cpp +++ b/src/qmlcompiler/qqmljstypedescriptionreader.cpp @@ -352,13 +352,14 @@ void QQmlJSTypeDescriptionReader::readProperty(UiObjectDefinition *ast, const QQ property.setRevision(readIntBinding(script)); } else if (id == QLatin1String("bindable")) { property.setBindable(readStringBinding(script)); - } else if (id == QLatin1String("read") || id == QLatin1String("write")) { - // QQmlJSMetaProperty currently does not make use of the getter and setter name - continue; + } else if (id == QLatin1String("read")) { + property.setRead(readStringBinding(script)); + } else if (id == QLatin1String("write")) { + property.setWrite(readStringBinding(script)); } else { addWarning(script->firstSourceLocation(), - tr("Expected only type, name, revision, isPointer, isReadonly, isRequired, bindable, and" - " isList script bindings.")); + tr("Expected only type, name, revision, isPointer, isReadonly, isRequired, " + "bindable, read, write, and isList script bindings.")); } } |
