diff --git a/src/models/mergeproxymodel.cpp b/src/models/mergeproxymodel.cpp index 9edec8a..c0f24cd 100644 --- a/src/models/mergeproxymodel.cpp +++ b/src/models/mergeproxymodel.cpp @@ -188,7 +188,7 @@ void MergeProxyModelPrivate::slotSourceLayoutAboutToBeChanged(const QListpersistentIndexList(); layoutChangePersistentIndexes.reserve(persistentIndexList.size()); - for (const QPersistentModelIndex &proxyPersistentIndex : persistentIndexList) { + for (const QPersistentModelIndex &proxyPersistentIndex : std::as_const(persistentIndexList)) { proxyIndexes << proxyPersistentIndex; Q_ASSERT(proxyPersistentIndex.isValid()); const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex);