From 91096126440aafba22aeb9307cb72135b3156a4c Mon Sep 17 00:00:00 2001 From: mread Date: Fri, 26 Aug 2011 13:30:53 +0100 Subject: Porting the QTBUG-21084 fix to 4.7.4 This fixes a memory leak. It's SR1 tagged for 4.7.4. Task-number: QTBUG-21084 Reviewed-by: Honglei Zhang --- src/declarative/util/qdeclarativelistmodel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index d0c8cc8..92aa6d0 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -784,6 +784,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & QDeclarativeListModel *rv = static_cast(obj); ModelNode *root = new ModelNode(rv->m_nested); + rv->m_nested->m_ownsRoot = true; rv->m_nested->_root = root; QStack nodes; nodes << root; -- cgit v0.12