diff options
Diffstat (limited to 'tests/auto/shared/testmodel.h')
-rw-r--r-- | tests/auto/shared/testmodel.h | 2 |
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), |