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:
parent
f37ea6c5c6
commit
8dc43adcbb
@ -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 "../"
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user