diff options
author | Andreas Buhr <andreas.buhr@qt.io> | 2021-12-08 10:55:18 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-12-09 14:48:05 +0000 |
commit | ae1ef5944bc0bdb75619eb5934b773eb4e62a90a (patch) | |
tree | edda5f805d6667ff2caf175c2ca5199b938816c9 | |
parent | b2e810da53f6feffaf8282cae720530a13b54c04 (diff) |
Fix typo in QAbstractItemModelTester
When recursively checking children in QAbstractItemModelTester,
the currentDepth of recursion was incorrectly increased.
This patch fixes it.
Change-Id: Ia79508f358e2fcb6b90780a79baec053522e871c
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 1f2f61d80860f55638cfd194bbed5d679a588b1f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/testlib/qabstractitemmodeltester.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/testlib/qabstractitemmodeltester.cpp b/src/testlib/qabstractitemmodeltester.cpp index ff2327ab49..039506d50b 100644 --- a/src/testlib/qabstractitemmodeltester.cpp +++ b/src/testlib/qabstractitemmodeltester.cpp @@ -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); |