mirror of
https://github.com/status-im/QtModelsToolkit.git
synced 2026-08-30 17:41:12 +00:00
A Q_INVOKABLE returning a QVariant holding a QObject* makes the object destructible by the JS GC (qv4qobjectwrapper transfers ownership unless explicitly set). ModelQuery::get(model, row, roleName) returns nested submodels (e.g. QQmlListModel's cached nested models) this way; the GC could delete them while the source model still owns them, causing a double-free/UAF in ListModel::destroy() on model teardown.