summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp1
-rw-r--r--src/qtquick1/util/qdeclarativelistmodel.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 15d87c828d..da841c1618 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -932,6 +932,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray &
QDeclarativeListModel *rv = static_cast<QDeclarativeListModel *>(obj);
ModelNode *root = new ModelNode(rv->m_nested);
+ rv->m_nested->m_ownsRoot = true;
rv->m_nested->_root = root;
QStack<ModelNode *> nodes;
nodes << root;
diff --git a/src/qtquick1/util/qdeclarativelistmodel.cpp b/src/qtquick1/util/qdeclarativelistmodel.cpp
index d5aa75bec5..08e15c52b6 100644
--- a/src/qtquick1/util/qdeclarativelistmodel.cpp
+++ b/src/qtquick1/util/qdeclarativelistmodel.cpp
@@ -787,6 +787,7 @@ void QDeclarative1ListModelParser::setCustomData(QObject *obj, const QByteArray
QDeclarative1ListModel *rv = static_cast<QDeclarative1ListModel *>(obj);
ModelNode *root = new ModelNode(rv->m_nested);
+ rv->m_nested->m_ownsRoot = true;
rv->m_nested->_root = root;
QStack<ModelNode *> nodes;
nodes << root;