diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-04-30 20:29:39 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-07-22 13:49:09 +0200 |
commit | 2338bb1faac05c87575495d324be6b8c5066479a (patch) | |
tree | 46c92157ec0865e2dfbd7c48c53b0b7c7a73bf9c /src/qml/types/qqmlinstantiator.cpp | |
parent | fb4edc2359b3761f0f01afac33b8441bbbda22ab (diff) |
Fix QQmlDelegateModelChangeArray
The class had a vtable, clashing with assumptions about Managed
objects. The derived classes where actually only cosmetic sugar
on top of the basic change class. Clean this up and unify the
functionality in the base class.
In addition adjust the class to the new data layout.
Change-Id: I8677f6c71465381f7ebdf82eb6025fda6d137ec3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/types/qqmlinstantiator.cpp')
-rw-r--r-- | src/qml/types/qqmlinstantiator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/types/qqmlinstantiator.cpp b/src/qml/types/qqmlinstantiator.cpp index 724a76825b..73e4ba851a 100644 --- a/src/qml/types/qqmlinstantiator.cpp +++ b/src/qml/types/qqmlinstantiator.cpp @@ -137,7 +137,7 @@ void QQmlInstantiatorPrivate::_q_modelUpdated(const QQmlChangeSet &changeSet, bo int difference = 0; QHash<int, QVector<QPointer<QObject> > > moved; - foreach (const QQmlChangeSet::Remove &remove, changeSet.removes()) { + foreach (const QQmlChangeSet::Change &remove, changeSet.removes()) { int index = qMin(remove.index, objects.count()); int count = qMin(remove.index + remove.count, objects.count()) - index; if (remove.isMove()) { @@ -156,7 +156,7 @@ void QQmlInstantiatorPrivate::_q_modelUpdated(const QQmlChangeSet &changeSet, bo difference -= remove.count; } - foreach (const QQmlChangeSet::Insert &insert, changeSet.inserts()) { + foreach (const QQmlChangeSet::Change &insert, changeSet.inserts()) { int index = qMin(insert.index, objects.count()); if (insert.isMove()) { QVector<QPointer<QObject> > movedObjects = moved.value(insert.moveId); |