Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.2.0 Beta1
-
219ca3bf2be65fb4f1741bdc7b53d6dc4a41dd31 (qt/qtdeclarative/dev) 784aad8fd0387e11297cd27ed814e875dc5f914b (qt/qtdeclarative/6.2), 718f3469f (dev), 749470e6b (tqtc/lts-6.2), 389110675 (6.5), a22ea1619 (6.4)
Description
Suppose an object is created in C++ and its ownership is set to CppOwnership explicitly by QJSEngine::setObjectOwnership().
Once it is referenced by a list element and its invocable method is called by QML engine, then its ownership turns to JavaScriptOwnership.
I made an autotest that reproduces the issue.
https://codereview.qt-project.org/c/qt/qtdeclarative/+/368105
Attachments
Issue Links
- relates to
-
QTBUG-34433 Instantiator in QtQuick Controls gives error when onObjectRemoved is called.
- Open
-
QTBUG-95895 REG 5.15 -> 6.2: destroy() does not destroy objects after appending listModel.
- Closed
For Gerrit Dashboard: QTBUG-96167 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
368105,4 | QQmlListModel: Fix C++ owned object getting destroyed | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
368392,2 | QQmlListModel: Fix C++ owned object getting destroyed | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
456771,4 | ListModel: Use PersistentValue to keep track of objects | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
457053,2 | ListModel: Use PersistentValue to keep track of objects | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
457054,3 | ListModel: Use PersistentValue to keep track of objects | 6.4 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
457121,3 | ListModel: Use PersistentValue to keep track of objects | tqtc/lts-6.2 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |