From 630385751a806b64d41295ee50957e2a9138a193 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 31 Jul 2019 13:55:50 +0200 Subject: [PATCH] QmlDesigner: Remove last use of Java-style iterators Change-Id: Iec4e99c19edcdd7476751018169b776eb6c8fefc Reviewed-by: Thomas Hartmann --- .../components/formeditor/contentnoteditableindicator.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp index 22e1c86dbcf..4c96433e5be 100644 --- a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp @@ -111,14 +111,12 @@ void ContentNotEditableIndicator::addAddiationEntries(const QList &itemList) { - QMutableListIterator entryIterator(m_entryList); - - while (entryIterator.hasNext()) { - EntryPair &entryPair = entryIterator.next(); + for (int i = 0; i < m_entryList.size(); ++i) { + const EntryPair &entryPair = m_entryList.at(i); if (!itemList.contains(entryPair.first)) { delete entryPair.second; entryPair.first->blurContent(false); - entryIterator.remove(); + m_entryList.removeAt(i--); } } }