summaryrefslogtreecommitdiff
path: root/tests/auto/shared/testmodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/shared/testmodel.h')
-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 00e74129..d1f49a4d 100644
--- a/tests/auto/shared/testmodel.h
+++ b/tests/auto/shared/testmodel.h
@@ -238,7 +238,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),