diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-02-03 16:30:26 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-04 18:28:43 +0100 |
commit | 5a40ca19d98a76c9ab0c7a9de8f4b31fcdcd9317 (patch) | |
tree | f24cf1c23d8f0b5fb78bf2119f3eaf036c7ca26a | |
parent | b9fce6c9d1c6905edbd2e5629cc3fd166a88428a (diff) |
[new compiler] Fix JS ownership of QML created objects
It's allowed to call destroy() on them, so allow for destruction
unless the constructor set ownership upfront.
Change-Id: I3887c5ab1bb6de7de3b0c7b14f4791d4ed1e0979
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r-- | src/qml/qml/qqmlobjectcreator.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlobjectcreator.cpp b/src/qml/qml/qqmlobjectcreator.cpp index 5bb210b28b..2ccacc7793 100644 --- a/src/qml/qml/qqmlobjectcreator.cpp +++ b/src/qml/qml/qqmlobjectcreator.cpp @@ -903,6 +903,7 @@ QObject *QmlObjectCreator::createInstance(int index, QObject *parent) } QQmlData *ddata = QQmlData::get(instance, /*create*/true); + ddata->setImplicitDestructible(); if (static_cast<quint32>(index) == qmlUnit->indexOfRootObject) { if (ddata->context) { Q_ASSERT(ddata->context != context); |