aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2022-05-25 16:24:24 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2022-06-02 10:07:40 +0200
commit87053c5422bdaeb8bc0052bf818b31d1ae49c5a5 (patch)
tree4eb0e2dc14ac6c25a0b3e415d5e81803eda97887 /tests
parent26179e693717535eeff2e7b2a6ee99dc02dcd8f9 (diff)
Inherit base type access semantics in QQmlJSScopes
Group scopes may be value types so they require access semantics different from a default value Ordinary scopes and attached scopes seem unaffected, only groups are thus covered with an extra logic Change-Id: Ia9012548a602ca7ca07296491d27a295f4455f91 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp b/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp
index 4b7e26bcbc..e50afcda99 100644
--- a/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp
+++ b/tests/auto/qml/qqmljsscope/tst_qqmljsscope.cpp
@@ -394,6 +394,7 @@ void tst_qqmljsscope::groupedPropertySyntax()
QCOMPARE(fontBindings[0].bindingType(), QQmlJSMetaPropertyBinding::GroupProperty);
auto fontScope = fontBindings[0].groupType();
QVERIFY(fontScope);
+ QCOMPARE(fontScope->accessSemantics(), QQmlJSScope::AccessSemantics::Value);
auto subbindings = fontScope->ownPropertyBindings();
QCOMPARE(subbindings.size(), 2);
@@ -422,6 +423,7 @@ void tst_qqmljsscope::attachedProperties()
QCOMPARE(binding.bindingType(), QQmlJSMetaPropertyBinding::AttachedProperty);
auto keysScope = binding.attachingType();
QVERIFY(keysScope);
+ QCOMPARE(keysScope->accessSemantics(), QQmlJSScope::AccessSemantics::Reference);
*bindings = keysScope->ownPropertyBindings();
};