QmlDesigner: Remove last use of Java-style iterators

Change-Id: Iec4e99c19edcdd7476751018169b776eb6c8fefc
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
hjk
2019-07-31 13:55:50 +02:00
parent b7366f3cce
commit 630385751a

View File

@@ -111,14 +111,12 @@ void ContentNotEditableIndicator::addAddiationEntries(const QList<FormEditorItem
void ContentNotEditableIndicator::removeEntriesWhichAreNotInTheList(const QList<FormEditorItem *> &itemList) void ContentNotEditableIndicator::removeEntriesWhichAreNotInTheList(const QList<FormEditorItem *> &itemList)
{ {
QMutableListIterator<EntryPair> entryIterator(m_entryList); for (int i = 0; i < m_entryList.size(); ++i) {
const EntryPair &entryPair = m_entryList.at(i);
while (entryIterator.hasNext()) {
EntryPair &entryPair = entryIterator.next();
if (!itemList.contains(entryPair.first)) { if (!itemList.contains(entryPair.first)) {
delete entryPair.second; delete entryPair.second;
entryPair.first->blurContent(false); entryPair.first->blurContent(false);
entryIterator.remove(); m_entryList.removeAt(i--);
} }
} }
} }