summaryrefslogtreecommitdiffstats
path: root/tools/assistant/lib/qhelpsearchquerywidget.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/qhelpsearchquerywidget.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/qhelpsearchquerywidget.cpp')
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp
index f2bb816..5782c12 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.cpp
+++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp
@@ -148,7 +148,7 @@ private:
<< QLatin1String("}") << QLatin1String("~");
// make sure we won't end up with an empty string
- foreach (const QString escapeChar, escapableCharsList) {
+ foreach (const QString &escapeChar, escapableCharsList) {
if (retValue.contains(escapeChar))
retValue.replace(escapeChar, QLatin1String(""));
}
@@ -156,7 +156,7 @@ private:
return retValue;
retValue = text; // now realy escape the string...
- foreach (const QString escapeChar, escapableCharsList) {
+ foreach (const QString &escapeChar, escapableCharsList) {
if (retValue.contains(escapeChar))
retValue.replace(escapeChar, escape + escapeChar);
}
@@ -317,7 +317,7 @@ private slots:
QStringList lst = similarQuery->text().split(exp, QString::SkipEmptyParts);
if (!lst.isEmpty()) {
QStringList fuzzy;
- foreach (const QString term, lst)
+ foreach (const QString &term, lst)
fuzzy += buildTermList(escapeString(term));
queryList.append(QHelpSearchQuery(QHelpSearchQuery::FUZZY, fuzzy));
}
@@ -325,7 +325,7 @@ private slots:
lst = withoutQuery->text().split(exp, QString::SkipEmptyParts);
if (!lst.isEmpty()) {
QStringList without;
- foreach (const QString term, lst)
+ foreach (const QString &term, lst)
without.append(escapeString(term));
queryList.append(QHelpSearchQuery(QHelpSearchQuery::WITHOUT, without));
}
@@ -339,7 +339,7 @@ private slots:
lst = allQuery->text().split(exp, QString::SkipEmptyParts);
if (!lst.isEmpty()) {
QStringList all;
- foreach (const QString term, lst)
+ foreach (const QString &term, lst)
all.append(escapeString(term));
queryList.append(QHelpSearchQuery(QHelpSearchQuery::ALL, all));
}
@@ -347,7 +347,7 @@ private slots:
lst = atLeastQuery->text().split(exp, QString::SkipEmptyParts);
if (!lst.isEmpty()) {
QStringList atLeast;
- foreach (const QString term, lst)
+ foreach (const QString &term, lst)
atLeast += buildTermList(escapeString(term));
queryList.append(QHelpSearchQuery(QHelpSearchQuery::ATLEAST, atLeast));
}