Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
-
f82a929a9f896b73e25b06f5eb4cf1a313dce60a
Description
The default "Arbitrary QML" code in the dynamic example calls "smile.destroy(1000)". If "Create" is clicked with this default code left in place, this error is triggered:
file:///Users/bealam/depot/qt/qt-qml/examples/declarative/dynamic/CustomObject:10: Error: Invalid attempt to destroy() an indestructible object
I noticed this is fixed if createQmlObject() is changed so that QDeclarativeDataPrivate::setImplicitDestructible() is called before QDeclarativeComponent::completeCreate(), as per the attached patch, but this causes other breakages in the qdeclarativelanguage unit test.
Attachments
Issue Links
- relates to
-
QTBUG-20454 Indestructible flag in QDeclarativeData doesn't have default value when zeroed
- Closed
-
QTBUG-20513 Dynamically created Objects cannot be destroyed because indestructible flag is set
- Closed
-
QTBUG-20626 [Regression] destroy() doesn't work on objects created dynamically in QML/JS.
- Closed