diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-10-11 13:59:46 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-10-13 14:03:41 +0200 |
commit | f2a15482ddd289a36b04316a2b6ebed83eb017c5 (patch) | |
tree | b2588d056ae5a80ac4b726571f6e1e3b0e362f8c /src/qml/parser/qqmljsast_p.h | |
parent | 4e645c7c33b03adf2d9161b00d00267add0aa373 (diff) |
Add a Pragma for list assign behavior
[ChangeLog][QtQml] You can now specify the list property assignment
behavior in QML using the "ListPropertyAssignBehavior" pragma. This is
analogous to the macros you can use in C++.
Fixes: QTBUG-93642
Change-Id: I9bdcf198031f1e24891f947b0990a3253d29a998
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast_p.h')
-rw-r--r-- | src/qml/parser/qqmljsast_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h index bd4e225412..ba646919dc 100644 --- a/src/qml/parser/qqmljsast_p.h +++ b/src/qml/parser/qqmljsast_p.h @@ -3135,8 +3135,8 @@ class QML_PARSER_EXPORT UiPragma: public Node public: QQMLJS_DECLARE_AST_NODE(UiPragma) - UiPragma(QStringView name) - : name(name) + UiPragma(QStringView name, QStringView value = {}) + : name(name), value(value) { kind = K; } void accept0(BaseVisitor *visitor) override; @@ -3149,6 +3149,7 @@ public: // attributes QStringView name; + QStringView value; SourceLocation pragmaToken; SourceLocation semicolonToken; }; |