diff -r 3b1da2848fc7 -r d3bac044e0f0 tools/assistant/lib/qhelpsearchindexwriter_default.cpp --- a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp Fri Feb 19 23:40:16 2010 +0200 +++ b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp Fri Mar 12 15:46:37 2010 +0200 @@ -104,7 +104,7 @@ return status; QDataStream docStream(&docFile); - foreach(const QStringList list, documentList) { + foreach(const QStringList &list, documentList) { docStream << list.at(0); docStream << list.at(1); } @@ -126,9 +126,9 @@ void Writer::setIndexFile(const QString &namespaceName, const QString &attributes) { - QString extention = namespaceName + QLatin1String("@") + attributes; - indexFile = indexPath + QLatin1String("/indexdb40.") + extention; - documentFile = indexPath + QLatin1String("/indexdoc40.") + extention; + QString extension = namespaceName + QLatin1String("@") + attributes; + indexFile = indexPath + QLatin1String("/indexdb40.") + extension; + documentFile = indexPath + QLatin1String("/indexdoc40.") + extension; } void Writer::insertInIndex(const QString &string, int docNum) @@ -226,7 +226,7 @@ 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 @@ const QList 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 @@ 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 @@ const QList attributeSets = engine.filterAttributeSets(namespaceName); - foreach (QStringList attributes, attributeSets) { + foreach (const QStringList &attributes, attributeSets) { writer.setIndexFile(namespaceName, attributes.join(QLatin1String("@"))); writer.removeIndex(); }