diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-11-23 14:45:46 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-11-30 13:50:43 +0000 |
commit | 6ed23b91b949b7edaf96cdb0f2bba7b21a02de89 (patch) | |
tree | 1c409252abf674cbc1bad4fcba247f51d78cb51c /src/qml/parser/qqmljsast_p.h | |
parent | 3b4f00ecb54432f514f184c251a316896a88f91a (diff) |
Fix support for namespaced types in property/signal declarations
Declarations such as
property Namespace.Item foo
or
property list<Namespace.Item> foo
would get rejected by the grammar due to the lack of productions. This
is now encapsulated in the UiPropertyType, which used to be merely an
identifier but is now changed to produce a UiQualifiedId - the same type
that's also used for MyNamespace.Item { ... } object declarations for
example.
Task-number: QTBUG-10822
Change-Id: Ic3ac1adbe17c83b24b67950c2f089e267b73b99b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast_p.h')
-rw-r--r-- | src/qml/parser/qqmljsast_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h index 2ca4e883d6..adb87c6c4e 100644 --- a/src/qml/parser/qqmljsast_p.h +++ b/src/qml/parser/qqmljsast_p.h @@ -2537,11 +2537,11 @@ class QML_PARSER_EXPORT UiParameterList: public Node public: QQMLJS_DECLARE_AST_NODE(UiParameterList) - UiParameterList(const QStringRef &t, const QStringRef &n): + UiParameterList(UiQualifiedId *t, const QStringRef &n): type (t), name (n), next (this) { kind = K; } - UiParameterList(UiParameterList *previous, const QStringRef &t, const QStringRef &n): + UiParameterList(UiParameterList *previous, UiQualifiedId *t, const QStringRef &n): type (t), name (n) { kind = K; @@ -2565,7 +2565,7 @@ public: } // attributes - QStringRef type; + UiQualifiedId *type; QStringRef name; UiParameterList *next; SourceLocation commaToken; @@ -2578,12 +2578,12 @@ class QML_PARSER_EXPORT UiPublicMember: public UiObjectMember public: QQMLJS_DECLARE_AST_NODE(UiPublicMember) - UiPublicMember(const QStringRef &memberType, + UiPublicMember(UiQualifiedId *memberType, const QStringRef &name) : type(Property), memberType(memberType), name(name), statement(0), binding(0), isDefaultMember(false), isReadonlyMember(false), parameters(0) { kind = K; } - UiPublicMember(const QStringRef &memberType, + UiPublicMember(UiQualifiedId *memberType, const QStringRef &name, Statement *statement) : type(Property), memberType(memberType), name(name), statement(statement), binding(0), isDefaultMember(false), isReadonlyMember(false), parameters(0) @@ -2614,7 +2614,7 @@ public: // attributes enum { Signal, Property } type; QStringRef typeModifier; - QStringRef memberType; + UiQualifiedId *memberType; QStringRef name; Statement *statement; // initialized with a JS expression UiObjectMember *binding; // initialized with a QML object or array. |