From 1065777a2ac1e6a9a0c4fc64d6ee0de02124c682 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 19 May 2019 19:37:00 +0200 Subject: QtGui: get rid of the last Java-style iterator Trivial. Java-style iterators are going to be deprecated. Change-Id: Ie94658be988cc095fb3b05d0d4ef6e7e3bf9a2af Reviewed-by: Giuseppe D'Angelo --- src/gui/text/qtextodfwriter.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index 8eaad403d0..4c89492795 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -473,9 +473,7 @@ void QTextOdfWriter::writeFormats(QXmlStreamWriter &writer, const QSet &for { writer.writeStartElement(officeNS, QString::fromLatin1("automatic-styles")); QVector allStyles = m_document->allFormats(); - QSetIterator formatId(formats); - while(formatId.hasNext()) { - int formatIndex = formatId.next(); + for (int formatIndex : formats) { QTextFormat textFormat = allStyles.at(formatIndex); switch (textFormat.type()) { case QTextFormat::CharFormat: -- cgit v1.2.3