diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-10-18 15:34:52 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-10-25 09:19:19 +0000 |
commit | 5eb508a31717c75d804cfb55e46e867c19ae58d2 (patch) | |
tree | 014bdba5e6b523626f0f03317162fddf6e40fde4 | |
parent | ecd183455b8039ee15b9d51fd1111992af19ed1c (diff) |
Fix clazy-strict-iterators
Change-Id: I9276a85f0a8061b2636687cf694b8ed1abaa18b8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
-rw-r--r-- | src/corelib/statemachine/qstatemachine.cpp | 2 | ||||
-rw-r--r-- | src/dbus/qdbusinternalfilters.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/qtexttable.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp | 2 | ||||
-rw-r--r-- | src/tools/moc/preprocessor.cpp | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index 1d80da55c9..2808ba2ced 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -411,7 +411,7 @@ QStateMachinePrivate::~QStateMachinePrivate() qDeleteAll(internalEventQueue); qDeleteAll(externalEventQueue); - for (QHash<int, DelayedEvent>::const_iterator it = delayedEvents.begin(), eit = delayedEvents.end(); it != eit; ++it) { + for (QHash<int, DelayedEvent>::const_iterator it = delayedEvents.cbegin(), eit = delayedEvents.cend(); it != eit; ++it) { delete it.value().event; } } diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp index 0927f326f2..0ef5061b5f 100644 --- a/src/dbus/qdbusinternalfilters.cpp +++ b/src/dbus/qdbusinternalfilters.cpp @@ -407,7 +407,7 @@ QDBusMessage qDBusPropertySet(const QDBusConnectionPrivate::ObjectTreeNode &node QDBusAdaptorConnector::AdaptorMap::ConstIterator it; it = std::lower_bound(connector->adaptors.constBegin(), connector->adaptors.constEnd(), interface_name); - if (it != connector->adaptors.end() && interface_name == QLatin1String(it->interface)) { + if (it != connector->adaptors.cend() && interface_name == QLatin1String(it->interface)) { return propertyWriteReply(msg, interface_name, property_name, writeProperty(it->adaptor, property_name, value)); } diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp index e4a3c2b915..9639c18d2b 100644 --- a/src/gui/text/qtexttable.cpp +++ b/src/gui/text/qtexttable.cpp @@ -1048,7 +1048,7 @@ void QTextTable::mergeCells(int row, int column, int numRows, int numCols) QFragmentFindHelper helper(origCellPosition, p->fragmentMap()); const auto begin = d->cells.cbegin(); const auto it = std::lower_bound(begin, d->cells.cend(), helper); - Q_ASSERT(it != d->cells.end()); + Q_ASSERT(it != d->cells.cend()); Q_ASSERT(!(helper < *it)); Q_ASSERT(*it == cellFragment); const int insertCellIndex = it - begin; @@ -1082,7 +1082,7 @@ void QTextTable::mergeCells(int row, int column, int numRows, int numCols) QFragmentFindHelper helper(pos, p->fragmentMap()); const auto begin = d->cells.cbegin(); const auto it = std::lower_bound(begin, d->cells.cend(), helper); - Q_ASSERT(it != d->cells.end()); + Q_ASSERT(it != d->cells.cend()); Q_ASSERT(!(helper < *it)); Q_ASSERT(*it == fragment); firstCellIndex = cellIndex = it - begin; diff --git a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp index 6016d460fc..48693ccdb0 100644 --- a/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp +++ b/src/plugins/platforminputcontexts/compose/qcomposeplatforminputcontext.cpp @@ -222,7 +222,7 @@ bool QComposeInputContext::checkComposeTable() int next = 1; do { // if we are at the end of the table, then we have nothing to do here - if (it + next != m_composeTable.end()) { + if (it + next != m_composeTable.constEnd()) { QComposeTableElement nextElem = *(it + next); if (isDuplicate(elem, nextElem)) { elem = nextElem; diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp index 9a06fb38d0..a6725af924 100644 --- a/src/tools/moc/preprocessor.cpp +++ b/src/tools/moc/preprocessor.cpp @@ -992,7 +992,7 @@ static void mergeStringLiterals(Symbols *_symbols) mergeSymbolLexem.reserve(literalsLength); mergeSymbolLexem.append('"'); mergeSymbolLexem.append(mergeSymbolOriginalLexem); - for (Symbols::const_iterator j = mergeSymbol + 1; j != i; ++j) + for (Symbols::iterator j = mergeSymbol + 1; j != i; ++j) mergeSymbolLexem.append(j->lex.constData() + j->from + 1, j->len - 2); // append j->unquotedLexem() mergeSymbolLexem.append('"'); mergeSymbol->len = mergeSymbol->lex.length(); |