Fix adding created objects to instantiator.
authorkakadu <kakadu.hafanana@gmail.com>
Thu, 24 Oct 2013 10:55:11 +0000 (14:55 +0400)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 29 Oct 2013 22:04:18 +0000 (23:04 +0100)
commit4d33a38f4b11cea2123b818487ff55f0988767bc
treea1c6dc9801315b40448b630b4ad20fd53accc88f
parent3d96c688a919c3ebc0ea3822e59bbc728c68eb95
Fix adding created objects to instantiator.

Before all new objects were pushed into the end of QVector,
i.e. if item model changes object with low index newly created object
will be added like it has big index. So, removing objects from
instantiator was buggy.

Task-number: QTBUG-33847.
Change-Id: I49fba53a40fce72060b629f737c10b525c67cc86
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
src/qml/types/qqmlinstantiator.cpp
tests/auto/qml/qqmlinstantiator/data/createAndRemove.qml [new file with mode: 0644]
tests/auto/qml/qqmlinstantiator/qqmlinstantiator.pro
tests/auto/qml/qqmlinstantiator/stringmodel.h [new file with mode: 0644]
tests/auto/qml/qqmlinstantiator/tst_qqmlinstantiator.cpp