diff options
author | Robin Burchell <robin.burchell@viroteck.net> | 2015-06-06 13:58:28 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-06-07 12:29:16 +0000 |
commit | 1507c33be746c878e0d798692a9503b89f8c146b (patch) | |
tree | 514854c226a0100bd409281e1ee6f412494084d7 /src/qml/qml/qqmlengine.cpp | |
parent | c8c6cc84a65af88f58b1380ce9973d3da403efdf (diff) |
QQmlData: Don't detach QObject::children list.
Use a const iterator.
Change-Id: I86177e866e3ec25c4201f9d9a36d23832b0b93db
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index fc5d672372..0050f32ec2 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -791,7 +791,7 @@ void QQmlData::markAsDeleted(QObject *o) QQmlData::setQueuedForDeletion(o); QObjectPrivate *p = QObjectPrivate::get(o); - for (QList<QObject *>::iterator it = p->children.begin(), end = p->children.end(); it != end; ++it) { + for (QList<QObject *>::const_iterator it = p->children.constBegin(), end = p->children.constEnd(); it != end; ++it) { QQmlData::markAsDeleted(*it); } } |