summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-12-03 10:29:07 +0100
committerLars Knoll <lars.knoll@qt.io>2019-08-13 07:34:00 +0100
commit00076a2695ddf429f478b43472b742921288bba0 (patch)
tree35ae82e6a3f89cf266bb829b20e63cdc0171be33 /tests
parentb68dbdd0094a546c49c5771173ff40577b3c02b2 (diff)
downloadqtbase-00076a2695ddf429f478b43472b742921288bba0.tar.gz
Don't insert items into the wrong row
This happened to work by chance, as QList::insert() would gracefully handle out of bounds insertions. Change-Id: I7ee1e645ed9a538946a509957ce5155641ffea1d Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp
index c8698242d5..ecc95d30b6 100644
--- a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp
+++ b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp
@@ -228,7 +228,7 @@ void ModelMoveCommand::doCommand()
if (srcParent == destParent)
d = m_destRow - (m_endRow - m_startRow + 1);
else
- d = m_destRow - (m_endRow - m_startRow) + 1;
+ d = m_destRow;
}
foreach (const qint64 id, l)