diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2014-10-23 12:05:44 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-10-24 10:58:52 +0200 |
commit | f876562de8eb978cea39fe72e76c49ae51ff2f97 (patch) | |
tree | 8bf0f51c48da760f977ed3fc296952cbbeb2e9d5 /src/qml/parser/qqmljsgrammar_p.h | |
parent | cfff375afcfe63d25b3c1904ff58a90bcd1edb43 (diff) |
Fix syntax error when trying to declare read-only object properties
The grammar did not allow for the declaration of
readonly property QtObject foo: QtObject { ... }
and it required a workaround through an alias:
readonly property alias foo: _foo
property QtObject _foo: QtObject { ... }
This was merely a glitch in the grammar, I see no reason not to support this.
The semantics are like a const pointer in C++, the property itself is read-only
but the object pointed to has per-property defined read/write semantics.
Task-number: QTBUG-41971
Change-Id: I99e2e7ed58731e387a38e46ec39922d280a21ceb
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/parser/qqmljsgrammar_p.h')
-rw-r--r-- | src/qml/parser/qqmljsgrammar_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/parser/qqmljsgrammar_p.h b/src/qml/parser/qqmljsgrammar_p.h index 6b3d1c8013..7a369be194 100644 --- a/src/qml/parser/qqmljsgrammar_p.h +++ b/src/qml/parser/qqmljsgrammar_p.h @@ -161,15 +161,15 @@ public: T_XOR = 79, T_XOR_EQ = 80, - ACCEPT_STATE = 663, - RULE_COUNT = 357, - STATE_COUNT = 664, + ACCEPT_STATE = 665, + RULE_COUNT = 358, + STATE_COUNT = 666, TERMINAL_COUNT = 106, NON_TERMINAL_COUNT = 111, - GOTO_INDEX_OFFSET = 664, - GOTO_INFO_OFFSET = 3104, - GOTO_CHECK_OFFSET = 3104 + GOTO_INDEX_OFFSET = 666, + GOTO_INFO_OFFSET = 3018, + GOTO_CHECK_OFFSET = 3018 }; static const char *const spell []; |