Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.2, 6.2.0 FF
-
None
-
348085dd7d1aeb83628eeb9687d70b0ba595dacd (qt/qtdeclarative/dev)
Description
From the docs:
The resources property contains non-visual resources that you want to reference by name.
Handlers are non-visual children. But compare the output of the two qml files. The reason is that QQuickItemPrivate::data_append() isn't called consistently, and that's where we call resources_append.
This brings up another point: in ExtraData.pointerHandlers we know every object is a pointer handler, so we can iterate those without casting. But I wonder if it would be worthwhile to save memory by delivering to handlers found in ExtraData.resourcesList instead, as long as we are sure they are always added there. It seems wasteful to always add them to two lists, and the pointerHandlers list was added only for this purpose, to iterate during event delivery. qmlobject_cast is not supposed to be terribly expensive. OTOH maybe sometimes there are many non-handler resources to skip over during event delivery.