aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qml/main.cpp
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-09-15 15:21:10 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2021-09-22 20:39:52 +0200
commit6f36faf96b488330f2388bdc8728d843f14c38f9 (patch)
tree80867e117fc47e405fa951aed35b9a4c6f26870b /tools/qml/main.cpp
parentcb79a6dafe4cf247e32053d1b28caa03eadcc331 (diff)
Fix required properties detection in QQmlObjectCreator
If the type comes from QML (either because it's invalid - defined in another document/compilation unit OR because it's an inline component), it means that our instance has a QML-originated base class. That class might have bindings on required properties (making them initialized). If those properties come from some more-distant C++ base type, they'll be in the propertyCache of currently processed type (in one of the parent caches), but we must not include them into the sharedState->requiredProperties as we lack the bindings from the QML-originated base class (so we may accidentally see uninitialized required properties that were actually initialized, just in a parent QML document). So: only consider own properties in such case, leaving the handling of parent-and-own properties to the first QML-defined type that has an immediate C++ base class - since we use sharedState to collect required properties, this'll work fine across different (sub)creators The only problematic case is when attached and group properties are involved. We need to decide what to do with them (maybe just leave the old logic for simplicity) While fixing the behavior, also update places that used propertyCount() implementation without using the function itself Pick-to: 6.2 Fixes: QTBUG-96200 Task-number: QTBUG-96544 Change-Id: I28f45037790faddaa1b2f07e78544839f60563c7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tools/qml/main.cpp')
0 files changed, 0 insertions, 0 deletions