diff options
| author | Alexander Lohnau <[email protected]> | 2020-10-24 16:46:34 +0200 |
|---|---|---|
| committer | Alexander Lohnau <[email protected]> | 2020-10-24 16:46:34 +0200 |
| commit | 2448f88c5f42d7a2040fcf3bcd3c5f2a2f62cd03 (patch) | |
| tree | 7a9164be1621a4c5696e776be299293ad1f1da60 /src/kitemviews/kfileitemmodel.cpp | |
| parent | 97415729c34851df75c77a67f27d6299c00bfbc4 (diff) | |
Use mutable iterators where required
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index b89fe4f58..08407d1ef 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -917,7 +917,9 @@ void KFileItemModel::slotCompleted() // Note that the parent folder must be expanded before any of its subfolders become visible. // Therefore, some URLs in m_restoredExpandedUrls might not be visible yet // -> we expand the first visible URL we find in m_restoredExpandedUrls. - for (const QUrl& url : qAsConst(m_urlsToExpand)) { + QMutableSetIterator<QUrl> it(m_urlsToExpand); + while (it.hasNext()) { + const QUrl url = it.next(); const int indexForUrl = index(url); if (indexForUrl >= 0) { m_urlsToExpand.remove(url); |
