diff options
author | ck <qt-info@nokia.com> | 2010-02-01 16:41:13 (GMT) |
---|---|---|
committer | ck <qt-info@nokia.com> | 2010-02-01 16:41:53 (GMT) |
commit | ff8e8af2c16362ab0bbf7ea14bcdd83b711ebd46 (patch) | |
tree | 59e4ac0f82fa0be3ce8bf86942056e5e968beed5 /tools/assistant/lib/qhelpdbreader.cpp | |
parent | 296b2f47b652c0f200b19bf556649b56efa6f26f (diff) | |
download | Qt-ff8e8af2c16362ab0bbf7ea14bcdd83b711ebd46.zip Qt-ff8e8af2c16362ab0bbf7ea14bcdd83b711ebd46.tar.gz Qt-ff8e8af2c16362ab0bbf7ea14bcdd83b711ebd46.tar.bz2 |
Assistant: Use const references in foreach loops.
Reviewed-by: kh1
Diffstat (limited to 'tools/assistant/lib/qhelpdbreader.cpp')
-rw-r--r-- | tools/assistant/lib/qhelpdbreader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/assistant/lib/qhelpdbreader.cpp b/tools/assistant/lib/qhelpdbreader.cpp index 904124b..6dd949a 100644 --- a/tools/assistant/lib/qhelpdbreader.cpp +++ b/tools/assistant/lib/qhelpdbreader.cpp @@ -515,7 +515,7 @@ QVariant QHelpDBReader::metaData(const QString &name) const QString QHelpDBReader::mergeList(const QStringList &list) const { QString str; - foreach (QString s, list) + foreach (const QString &s, list) str.append(QLatin1Char('\'') + quote(s) + QLatin1String("\', ")); if (str.endsWith(QLatin1String(", "))) str = str.left(str.length()-2); @@ -567,14 +567,14 @@ bool QHelpDBReader::createAttributesCache(const QStringList &attributes, bool needUpdate = !m_viewAttributes.count(); - foreach (QString s, attributes) + foreach (const QString &s, attributes) m_viewAttributes.remove(s); if (m_viewAttributes.count() || needUpdate) { m_viewAttributes.clear(); m_indicesCache = indexIds; } - foreach (QString s, attributes) + foreach (const QString &s, attributes) m_viewAttributes.insert(s); m_useAttributesCache = true; return true; |