QtBase: use preincrement for iterator types

... because it's useful for non-primitive types.
Except for index-based loops, these were the only two
remaining instances in QtBase.

Change-Id: I0fafa502d78a70f98b4a90f4d3c7fdfbb401a90f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Anton Kudryavtsev 2015-12-08 12:23:28 +03:00 committed by Marc Mutz
parent f37ea6c5c6
commit 8dc43adcbb
2 changed files with 2 additions and 2 deletions

View File

@ -372,7 +372,7 @@ bool QFileSystemEntry::isClean() const
int dots = 0;
bool dotok = true; // checking for ".." or "." starts to relative paths
bool slashok = true;
for (QString::const_iterator iter = m_filePath.constBegin(); iter != m_filePath.constEnd(); iter++) {
for (QString::const_iterator iter = m_filePath.constBegin(); iter != m_filePath.constEnd(); ++iter) {
if (*iter == QLatin1Char('/')) {
if (dots == 1 || dots == 2)
return false; // path contains "./" or "../"

View File

@ -251,7 +251,7 @@ void QMacPrintEnginePrivate::initialize()
setPageSize(m_pageLayout.pageSize());
QHash<QMacPrintEngine::PrintEnginePropertyKey, QVariant>::const_iterator propC;
for (propC = valueCache.constBegin(); propC != valueCache.constEnd(); propC++) {
for (propC = valueCache.constBegin(); propC != valueCache.constEnd(); ++propC) {
q->setProperty(propC.key(), propC.value());
}
}