summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-05-19 19:37:00 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-05-21 08:57:42 +0200
commit1065777a2ac1e6a9a0c4fc64d6ee0de02124c682 (patch)
tree9891b2697de3b0dcd9ed40b6299ef7a0d3e49266 /src/gui/text
parentb03385f9cff7acc2b37933f493e3eff2d8bbef59 (diff)
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 <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextodfwriter.cpp4
1 files changed, 1 insertions, 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<int> &for
{
writer.writeStartElement(officeNS, QString::fromLatin1("automatic-styles"));
QVector<QTextFormat> allStyles = m_document->allFormats();
- QSetIterator<int> formatId(formats);
- while(formatId.hasNext()) {
- int formatIndex = formatId.next();
+ for (int formatIndex : formats) {
QTextFormat textFormat = allStyles.at(formatIndex);
switch (textFormat.type()) {
case QTextFormat::CharFormat: