aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSami Shalayel <sami.shalayel@qt.io>2022-08-05 16:17:07 +0200
committerSami Shalayel <sami.shalayel@qt.io>2022-09-01 22:12:32 +0200
commitd9add5c2d477792669fcff380a6c41ec72c7a050 (patch)
treeaac22cb0c045ebe04ed44d542817422dd269df6c /tools
parent2879c7c3411955b1d4f795436f803abd960c176d (diff)
qmltc: test support for generalized group properties
Test support for generalized group properties in qmltc. Also, force group property bindings to be deferred when they belong to a generalized grouped property, while "not-generalized" grouped properties never are deferred. Fixes: QTBUG-105378 Change-Id: Iadc64d7033f9446ccf53e305d8831c7d348f257c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmltc/qmltccompiler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/qmltc/qmltccompiler.cpp b/tools/qmltc/qmltccompiler.cpp
index 0a26ebc2d7..374cf214fa 100644
--- a/tools/qmltc/qmltccompiler.cpp
+++ b/tools/qmltc/qmltccompiler.cpp
@@ -875,7 +875,10 @@ void QmltcCompiler::compileBinding(QmltcType &current, const QQmlJSMetaPropertyB
// (potentially, with all the bindings inside of it), period.
if (type->isNameDeferred(propertyName)) {
const auto location = binding.sourceLocation();
- if (bindingType == QQmlJSMetaPropertyBinding::GroupProperty) {
+ // make sure group property is not generalized by checking if type really has a property
+ // called propertyName. If not, it is probably an id.
+ if (bindingType == QQmlJSMetaPropertyBinding::GroupProperty
+ && type->hasProperty(propertyName)) {
qCWarning(lcQmltcCompiler)
<< QStringLiteral("Binding at line %1 column %2 is not deferred as it is a "
"binding on a group property.")