Fix typo in QAbstractItemModelTester

When recursively checking children in QAbstractItemModelTester,
the currentDepth of recursion was incorrectly increased.
This patch fixes it.

Pick-to: 6.2 5.15
Change-Id: Ia79508f358e2fcb6b90780a79baec053522e871c
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Andreas Buhr 2021-12-08 10:55:18 +01:00
parent d4a88e4ea4
commit 1f2f61d808

View File

@ -570,7 +570,7 @@ void QAbstractItemModelTesterPrivate::checkChildren(const QModelIndex &parent, i
// recursively go down the children
if (model->hasChildren(index) && currentDepth < 10)
checkChildren(index, ++currentDepth);
checkChildren(index, currentDepth + 1);
// make sure that after testing the children that the index doesn't change.
QModelIndex newerIndex = model->index(r, c, parent);