summaryrefslogtreecommitdiffstats
path: root/tools/assistant/lib/qhelpsearchindexwriter_default.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/qhelpsearchindexwriter_default.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/qhelpsearchindexwriter_default.cpp')
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_default.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
index 108be97..70999e5 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
@@ -104,7 +104,7 @@ bool Writer::writeIndex() const
return status;
QDataStream docStream(&docFile);
- foreach(const QStringList list, documentList) {
+ foreach(const QStringList &list, documentList) {
docStream << list.at(0);
docStream << list.at(1);
}
@@ -226,7 +226,7 @@ void QHelpSearchIndexWriter::run()
QStringList namespaces;
Writer writer(indexPath);
- foreach(const QString namespaceName, registeredDocs) {
+ foreach(const QString &namespaceName, registeredDocs) {
mutex.lock();
if (m_cancel) {
mutex.unlock();
@@ -242,7 +242,7 @@ void QHelpSearchIndexWriter::run()
const QList<QStringList> attributeSets =
engine.filterAttributeSets(namespaceName);
- foreach (QStringList attributes, attributeSets) {
+ foreach (const QStringList &attributes, attributeSets) {
// cleanup maybe old or unfinished files
writer.setIndexFile(namespaceName, attributes.join(QLatin1String("@")));
writer.removeIndex();
@@ -266,7 +266,7 @@ void QHelpSearchIndexWriter::run()
int docNum = 0;
const QStringList documentsList(documentsSet.toList());
- foreach(const QString url, documentsList) {
+ foreach(const QString &url, documentsList) {
if (m_cancel)
return;
@@ -347,7 +347,7 @@ void QHelpSearchIndexWriter::run()
const QList<QStringList> attributeSets =
engine.filterAttributeSets(namespaceName);
- foreach (QStringList attributes, attributeSets) {
+ foreach (const QStringList &attributes, attributeSets) {
writer.setIndexFile(namespaceName, attributes.join(QLatin1String("@")));
writer.removeIndex();
}