Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
5.7.1, 5.9.5
-
Windows 7, with Qt5.7.1 / QtQuick 2.7
Description
When having an object B which is declared within an object A, and A is passed to B as a property, properties of A that are accessed by B will be initialized twice.
This also happens, if I reference an object that is declared in another file by it's id, but seemingly not when referenced by parent.
This can be problematic, as e.g. propertyChanged-signals are fired.
Also, if used with dynamic object creation, it can lead to significant overhead, as possibly large objects are created twice which takes time, and if the first object is not manually destroyed will be a source for memory leakage.
Maybe a check, whether the property is already initialised could be implemented.
Attachments
Issue Links
- is duplicated by
-
QTBUG-66945 Qt Qml: sometimes properties expressions are evaluated twice during initialization
- Closed