summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-09-08 16:21:53 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-09-22 20:40:36 +0200
commitc4a8c2b0d039f34b26ddd70c7e66022a037a10c4 (patch)
treecfbe2145ee547a3dbd0095aea46beb054c0192e6 /tests/auto/other
parentbf2587d9e5a3b25ca6dc1224a635bd8565681d2b (diff)
Silence compiler warning
Don't get a QModelIndex out of a temporary QPersistentModelIndex. Pick-to: 6.6 Change-Id: Ida9e25f1a17130e19b75221e1189e6f2fccd3f27 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp
index 1bd7caeb9b..0b99e49392 100644
--- a/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp
+++ b/tests/auto/other/qabstractitemmodelutils/dynamictreemodel.cpp
@@ -307,7 +307,7 @@ void ModelChangeChildrenLayoutsCommand::doCommand()
// changing any children of that parent. The reason is that we're keeping parent1 and parent2
// around as QPersistentModelIndex instances, and we query idx.parent() in the loop.
QModelIndexList persistent = m_model->persistentIndexList();
- for (const QModelIndex &parent : parents) {
+ for (const QPersistentModelIndex &parent : parents) {
int idx = persistent.indexOf(parent);
if (idx != -1)
persistent.move(idx, 0);