diff options
author | Bea Lam <bea.lam@nokia.com> | 2011-08-25 08:13:44 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2011-08-25 08:14:36 (GMT) |
commit | c1491c356f3cca92a359468ce37f38bc1873eec4 (patch) | |
tree | 7c9ddf80186684e3b6f59ea49fdeb207d7787afc /src/declarative/util | |
parent | 9496a87a8ad6c78952750c1529da637fc622a23c (diff) | |
download | Qt-c1491c356f3cca92a359468ce37f38bc1873eec4.zip Qt-c1491c356f3cca92a359468ce37f38bc1873eec4.tar.gz Qt-c1491c356f3cca92a359468ce37f38bc1873eec4.tar.bz2 |
Fix memory leak in ListModel custom parser
ModelNodes created by the parser for ListElement definitions were not
deleted.
Task-number: QTBUG-21084
Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qdeclarativelistmodel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 28c2df6..9604117 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<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; |