Adjust the parent index for the itemsMoved call.
authorStephen Kelly <stephen.kelly@kdab.com>
Wed, 13 Oct 2010 09:42:10 +0000 (11:42 +0200)
committerJason McDonald <jason.mcdonald@nokia.com>
Fri, 15 Oct 2010 04:23:24 +0000 (14:23 +1000)
commit6a007684823298721ba2bdb26c8c0f726201547a
treeee88155e7746faf99ca72dce92736bb90f7f2715
parent98161f191ba6f3353404c61829e88419d7c4688a
Adjust the parent index for the itemsMoved call.

Not doing this causes the parent QModelIndexes to be out of sync with
the model.

The fix in fe350ca756df6392b3d0b7840351fccc89f9ef6f is extended to also
use adjusted indexes in the itemMove call.

Merge-request: 849
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
(cherry picked from commit 62dc9c9602987f4381481cc5642e3ea0782bb418)
src/corelib/kernel/qabstractitemmodel.cpp
tests/auto/modeltest/dynamictreemodel.cpp
tests/auto/qabstractitemmodel/tst_qabstractitemmodel.cpp