summaryrefslogtreecommitdiffstats
path: root/tools/assistant/lib/qhelpindexwidget.cpp
diff options
context:
space:
mode:
authorck <qt-info@nokia.com>2010-02-01 16:41:13 (GMT)
committerck <qt-info@nokia.com>2010-02-01 16:41:53 (GMT)
commitff8e8af2c16362ab0bbf7ea14bcdd83b711ebd46 (patch)
tree59e4ac0f82fa0be3ce8bf86942056e5e968beed5 /tools/assistant/lib/qhelpindexwidget.cpp
parent296b2f47b652c0f200b19bf556649b56efa6f26f (diff)
downloadQt-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/qhelpindexwidget.cpp')
-rw-r--r--tools/assistant/lib/qhelpindexwidget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/assistant/lib/qhelpindexwidget.cpp b/tools/assistant/lib/qhelpindexwidget.cpp
index 6757805..270bcdd 100644
--- a/tools/assistant/lib/qhelpindexwidget.cpp
+++ b/tools/assistant/lib/qhelpindexwidget.cpp
@@ -162,7 +162,7 @@ void QHelpIndexProvider::run()
QSet<QString> indicesSet;
m_mutex.unlock();
- foreach (QString dbFileName, m_helpEngine->fileNameReaderMap.keys()) {
+ foreach (const QString &dbFileName, m_helpEngine->fileNameReaderMap.keys()) {
m_mutex.lock();
if (m_abort) {
m_mutex.unlock();
@@ -178,7 +178,7 @@ void QHelpIndexProvider::run()
QStringList lst = reader.indicesForFilter(atts);
if (!lst.isEmpty()) {
m_mutex.lock();
- foreach (QString s, lst)
+ foreach (const QString &s, lst)
indicesSet.insert(s);
if (m_abort) {
m_mutex.unlock();
@@ -317,7 +317,7 @@ QModelIndex QHelpIndexModel::filter(const QString &filter, const QString &wildca
if (!wildcard.isEmpty()) {
QRegExp regExp(wildcard, Qt::CaseInsensitive);
regExp.setPatternSyntax(QRegExp::Wildcard);
- foreach (QString index, d->indices) {
+ foreach (const QString &index, d->indices) {
if (index.contains(regExp)) {
lst.append(index);
if (perfectMatch == -1 && index.startsWith(filter, Qt::CaseInsensitive)) {
@@ -332,7 +332,7 @@ QModelIndex QHelpIndexModel::filter(const QString &filter, const QString &wildca
}
}
} else {
- foreach (QString index, d->indices) {
+ foreach (const QString &index, d->indices) {
if (index.contains(filter, Qt::CaseInsensitive)) {
lst.append(index);
if (perfectMatch == -1 && index.startsWith(filter, Qt::CaseInsensitive)) {