summaryrefslogtreecommitdiff
path: root/tests/auto/shared
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-27 20:23:57 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-27 22:10:06 +0200
commitabe319c9cb811832bb4c9c95290564dfa7b3603a (patch)
treee93b7e554b3cd497b86f0be3bd46450a91ea088e /tests/auto/shared
parentefdd81ce80b018b7b5779876e94f1b722af7fb9a (diff)
parent69b3136bae16897492d27558c5909cd61a5e598e (diff)
downloadqtquickcontrols-abe319c9cb811832bb4c9c95290564dfa7b3603a.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: tests/auto/qquicktreemodeladaptor/tst_qquicktreemodeladaptor.cpp Change-Id: I0b6018fdac65a5385136e4c3561fba1c52ecd32e
Diffstat (limited to 'tests/auto/shared')
-rw-r--r--tests/auto/shared/testmodel.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/shared/testmodel.h b/tests/auto/shared/testmodel.h
index d8ddd80a..6eaab74a 100644
--- a/tests/auto/shared/testmodel.h
+++ b/tests/auto/shared/testmodel.h
@@ -230,7 +230,7 @@ public:
bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)
{
Q_ASSERT_X(sourceRow >= 0 && sourceRow < rowCount(sourceParent)
- && count > 0 && sourceRow + count < rowCount(sourceParent)
+ && count > 0 && sourceRow + count - 1 < rowCount(sourceParent)
&& destinationChild >= 0 && destinationChild <= rowCount(destinationParent),
Q_FUNC_INFO, "Rows out of range.");
Q_ASSERT_X(!(sourceParent == destinationParent && destinationChild >= sourceRow && destinationChild < sourceRow + count),