summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorMaks Naumov <maksqwe1@ukr.net>2015-02-07 12:10:41 +0200
committerMaks Naumov <maksqwe1@ukr.net>2015-02-08 12:25:12 +0000
commitc2f26d6d0b70e591c74bf6664e30288a2d63dc9a (patch)
tree243d25d8fc79463ec7a3cc091e3da2574b89c4ff /src/gui/text
parent163b8529516ddda24833f635f737863ba98bd688 (diff)
Use prefix instead of postfix for iterators
The postfix increment(decrement) creates a temp copy of *this before the modification and then returns that copy. It's needed only when using the old iterator and then incrementing it. Change-Id: I7f6702de78f5f987cec3556047e76049b4ee063a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontdatabase.cpp2
-rw-r--r--src/gui/text/qfontengine.cpp2
-rw-r--r--src/gui/text/qtextodfwriter.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 3fc23513d7..8dbd78cd57 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -781,7 +781,7 @@ static QStringList fallbackFamilies(const QString &family, QFont::Style style, Q
}
if (!contains) {
i = retList.erase(i);
- i--;
+ --i;
}
}
return retList;
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index e686c9fe81..98ab78f0dc 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -2084,7 +2084,7 @@ QFontEngine *QFontEngineMulti::createMultiFontEngine(QFontEngine *fe, int script
fc->updateHitCountAndTimeStamp(it.value());
break;
}
- it++;
+ ++it;
}
if (!engine) {
engine = QGuiApplicationPrivate::instance()->platformIntegration()->fontDatabase()->fontEngineMulti(fe, QChar::Script(script));
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index 2c61d2cfd4..25e9bf1a56 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -278,7 +278,7 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
writer.writeStartElement(textNS, QString::fromLatin1("p"));
writer.writeAttribute(textNS, QString::fromLatin1("style-name"), QString::fromLatin1("p%1")
.arg(block.blockFormatIndex()));
- for (QTextBlock::Iterator frag= block.begin(); !frag.atEnd(); frag++) {
+ for (QTextBlock::Iterator frag = block.begin(); !frag.atEnd(); ++frag) {
writer.writeCharacters(QString()); // Trick to make sure that the span gets no linefeed in front of it.
writer.writeStartElement(textNS, QString::fromLatin1("span"));