summaryrefslogtreecommitdiffstats
path: root/tools/assistant/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/assistant/lib')
-rw-r--r--tools/assistant/lib/fulltextsearch/qclucene-config_p.h2
-rw-r--r--tools/assistant/lib/qhelpcollectionhandler.cpp10
-rw-r--r--tools/assistant/lib/qhelpcontentwidget.cpp2
-rw-r--r--tools/assistant/lib/qhelpdbreader.cpp6
-rw-r--r--tools/assistant/lib/qhelpenginecore.cpp8
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp14
-rw-r--r--tools/assistant/lib/qhelpindexwidget.cpp8
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp12
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_default.cpp22
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_default.cpp16
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.cpp30
-rw-r--r--tools/assistant/lib/qhelpsearchresultwidget.cpp4
12 files changed, 67 insertions, 67 deletions
diff --git a/tools/assistant/lib/fulltextsearch/qclucene-config_p.h b/tools/assistant/lib/fulltextsearch/qclucene-config_p.h
index 729ae72..0c70718 100644
--- a/tools/assistant/lib/fulltextsearch/qclucene-config_p.h
+++ b/tools/assistant/lib/fulltextsearch/qclucene-config_p.h
@@ -529,7 +529,7 @@ configure.
/* Conditional Debugging */
/* #undef _CL__CND_DEBUG */
-/* debuging option */
+/* debugging option */
/* #undef _DEBUG */
/* Number of bits in a file offset, on hosts where this is settable. */
diff --git a/tools/assistant/lib/qhelpcollectionhandler.cpp b/tools/assistant/lib/qhelpcollectionhandler.cpp
index 9fdbd8e..235f737 100644
--- a/tools/assistant/lib/qhelpcollectionhandler.cpp
+++ b/tools/assistant/lib/qhelpcollectionhandler.cpp
@@ -252,7 +252,7 @@ bool QHelpCollectionHandler::createTables(QSqlQuery *query)
"Key TEXT PRIMARY KEY, "
"Value BLOB )");
- foreach (QString q, tables) {
+ foreach (const QString &q, tables) {
if (!query->exec(q))
return false;
}
@@ -321,7 +321,7 @@ bool QHelpCollectionHandler::addCustomFilter(const QString &filterName,
idsToInsert.removeAll(m_query.value(1).toString());
}
- foreach (QString id, idsToInsert) {
+ foreach (const QString &id, idsToInsert) {
m_query.prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)"));
m_query.bindValue(0, id);
m_query.exec();
@@ -344,7 +344,7 @@ bool QHelpCollectionHandler::addCustomFilter(const QString &filterName,
m_query.bindValue(0, nameId);
m_query.exec();
- foreach (QString att, attributes) {
+ foreach (const QString &att, attributes) {
m_query.prepare(QLatin1String("INSERT INTO FilterTable VALUES(?, ?)"));
m_query.bindValue(0, nameId);
m_query.bindValue(1, attributeMap[att]);
@@ -398,7 +398,7 @@ bool QHelpCollectionHandler::registerDocumentation(const QString &fileName)
return false;
addFilterAttributes(reader.filterAttributes());
- foreach (QString filterName, reader.customFilters())
+ foreach (const QString &filterName, reader.customFilters())
addCustomFilter(filterName, reader.filterAttributes(filterName));
optimizeDatabase(fileName);
@@ -497,7 +497,7 @@ bool QHelpCollectionHandler::addFilterAttributes(const QStringList &attributes)
while (m_query.next())
atts.insert(m_query.value(0).toString());
- foreach (QString s, attributes) {
+ foreach (const QString &s, attributes) {
if (!atts.contains(s)) {
m_query.prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)"));
m_query.bindValue(0, s);
diff --git a/tools/assistant/lib/qhelpcontentwidget.cpp b/tools/assistant/lib/qhelpcontentwidget.cpp
index 3986afb..a80dc39 100644
--- a/tools/assistant/lib/qhelpcontentwidget.cpp
+++ b/tools/assistant/lib/qhelpcontentwidget.cpp
@@ -253,7 +253,7 @@ void QHelpContentProvider::run()
const QStringList fileNames = m_helpEngine->orderedFileNameList;
m_mutex.unlock();
- foreach (QString dbFileName, fileNames) {
+ foreach (const QString &dbFileName, fileNames) {
m_mutex.lock();
if (m_abort) {
m_abort = false;
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;
diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp
index 0fceaaa..a76fe69 100644
--- a/tools/assistant/lib/qhelpenginecore.cpp
+++ b/tools/assistant/lib/qhelpenginecore.cpp
@@ -168,7 +168,7 @@ void QHelpEngineCorePrivate::errorReceived(const QString &msg)
it is removed by calling removeCustomFilter(). customFilters() returns
all defined filters.
- The help engine also offers the possiblity to set and read values
+ The help engine also offers the possibility to set and read values
in a persistant way comparable to ini files or Windows registry
entries. For more information see setValue() or value().
@@ -362,7 +362,7 @@ QString QHelpEngineCore::documentationFileName(const QString &namespaceName)
if (d->setup()) {
const QHelpCollectionHandler::DocInfoList docList =
d->collectionHandler->registeredDocumentations();
- foreach(const QHelpCollectionHandler::DocInfo info, docList) {
+ foreach(const QHelpCollectionHandler::DocInfo &info, docList) {
if (info.namespaceName == namespaceName) {
if (QDir::isAbsolutePath(info.fileName))
return QDir::cleanPath(info.fileName);
@@ -386,7 +386,7 @@ QStringList QHelpEngineCore::registeredDocumentations() const
if (!d->setup())
return list;
const QHelpCollectionHandler::DocInfoList docList = d->collectionHandler->registeredDocumentations();
- foreach(const QHelpCollectionHandler::DocInfo info, docList) {
+ foreach(const QHelpCollectionHandler::DocInfo &info, docList) {
list.append(info.namespaceName);
}
return list;
@@ -532,7 +532,7 @@ QList<QUrl> QHelpEngineCore::files(const QString namespaceName,
url.setAuthority(namespaceName);
const QStringList files = reader->files(filterAttributes, extensionFilter);
- foreach (const QString file, files) {
+ foreach (const QString &file, files) {
url.setPath(QLatin1String("/") + file);
res.append(url);
}
diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp
index 63164cd..783f016 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -204,7 +204,7 @@ bool QHelpGenerator::generate(QHelpDataInterface *helpData,
addProgress(1.0);
emit statusChanged(tr("Insert custom filters..."));
- foreach (QHelpDataCustomFilter f, helpData->customFilters()) {
+ foreach (const QHelpDataCustomFilter &f, helpData->customFilters()) {
if (!registerCustomFilter(f.name, f.filterAttributes, true)) {
cleanupDB();
return false;
@@ -368,7 +368,7 @@ bool QHelpGenerator::createTables()
"Name Text, "
"Value BLOB )");
- foreach (QString q, tables) {
+ foreach (const QString &q, tables) {
if (!d->query->exec(q)) {
d->error = tr("Cannot create tables!");
return false;
@@ -632,7 +632,7 @@ bool QHelpGenerator::registerCustomFilter(const QString &filterName,
idsToInsert.removeAll(d->query->value(1).toString());
}
- foreach (QString id, idsToInsert) {
+ foreach (const QString &id, idsToInsert) {
d->query->prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)"));
d->query->bindValue(0, id);
d->query->exec();
@@ -667,7 +667,7 @@ bool QHelpGenerator::registerCustomFilter(const QString &filterName,
d->query->bindValue(0, nameId);
d->query->exec();
- foreach (QString att, filterAttribs) {
+ foreach (const QString &att, filterAttribs) {
d->query->prepare(QLatin1String("INSERT INTO FilterTable VALUES(?, ?)"));
d->query->bindValue(0, nameId);
d->query->bindValue(1, attributeMap[att]);
@@ -690,7 +690,7 @@ bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> &keywords,
indexId = d->query->value(0).toInt() + 1;
QList<int> filterAtts;
- foreach (QString filterAtt, filterAttributes) {
+ foreach (const QString &filterAtt, filterAttributes) {
d->query->prepare(QLatin1String("SELECT Id FROM FilterAttributeTable WHERE Name=?"));
d->query->bindValue(0, filterAtt);
d->query->exec();
@@ -787,7 +787,7 @@ bool QHelpGenerator::insertContents(const QByteArray &ba,
}
// associate the filter attributes
- foreach (QString filterAtt, filterAttributes) {
+ foreach (const QString &filterAtt, filterAttributes) {
d->query->prepare(QLatin1String("INSERT INTO ContentsFilterTable (FilterAttributeId, ContentsId) "
"SELECT Id, ? FROM FilterAttributeTable WHERE Name=?"));
d->query->bindValue(0, contentId);
@@ -812,7 +812,7 @@ bool QHelpGenerator::insertFilterAttributes(const QStringList &attributes)
while (d->query->next())
atts.insert(d->query->value(0).toString());
- foreach (QString s, attributes) {
+ foreach (const QString &s, attributes) {
if (!atts.contains(s)) {
d->query->prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)"));
d->query->bindValue(0, s);
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)) {
diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp
index c28947b..7c2635d 100644
--- a/tools/assistant/lib/qhelpsearchengine.cpp
+++ b/tools/assistant/lib/qhelpsearchengine.cpp
@@ -214,7 +214,7 @@ private:
search term
The QHelpSearchQuery class contains the field name and the associated search
- term. Depending on the field the search term might get split up into seperate
+ term. Depending on the field the search term might get split up into separate
terms to be parsed differently by the search engine.
\sa QHelpSearchQueryWidget
@@ -238,15 +238,15 @@ private:
\value DEFAULT the default field provided by the search widget, several terms should be
split and stored in the word list except search terms enclosed in quotes.
- \value FUZZY a field only provided in use with clucene. Terms should be split in seperate
+ \value FUZZY a field only provided in use with clucene. Terms should be split in separate
words and passed to the search engine.
- \value WITHOUT a field only provided in use with clucene. Terms should be split in seperate
+ \value WITHOUT a field only provided in use with clucene. Terms should be split in separate
words and passed to the search engine.
- \value PHRASE a field only provided in use with clucene. Terms should not be split in seperate
+ \value PHRASE a field only provided in use with clucene. Terms should not be split in separate
words.
- \value ALL a field only provided in use with clucene. Terms should be split in seperate
+ \value ALL a field only provided in use with clucene. Terms should be split in separate
words and passed to the search engine
- \value ATLEAST a field only provided in use with clucene. Terms should be split in seperate
+ \value ATLEAST a field only provided in use with clucene. Terms should be split in separate
words and passed to the search engine
*/
diff --git a/tools/assistant/lib/qhelpsearchindexreader_default.cpp b/tools/assistant/lib/qhelpsearchindexreader_default.cpp
index 1bc5feb..d2241a5 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_default.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader_default.cpp
@@ -166,7 +166,7 @@ void Reader::filterFilesForAttributes(const QStringList &attributes)
const QString fileName = it.key();
bool containsAll = true;
QStringList split = fileName.split(QLatin1String("@"));
- foreach (const QString attribute, attributes) {
+ foreach (const QString &attribute, attributes) {
if (!split.contains(attribute, Qt::CaseInsensitive)) {
containsAll = false;
break;
@@ -180,9 +180,9 @@ void Reader::filterFilesForAttributes(const QStringList &attributes)
void Reader::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;
}
bool Reader::splitSearchTerm(const QString &searchTerm, QStringList *terms,
@@ -235,7 +235,7 @@ bool Reader::splitSearchTerm(const QString &searchTerm, QStringList *terms,
void Reader::searchInIndex(const QStringList &terms)
{
- foreach (const QString term, terms) {
+ foreach (const QString &term, terms) {
QVector<Document> documents;
for(IndexTable::ConstIterator it = searchIndexTable.begin();
@@ -254,7 +254,7 @@ void Reader::searchInIndex(const QStringList &terms)
DocumentInfo info;
QString title, url;
QVector<DocumentInfo> documentsInfo;
- foreach(const Document doc, documents) {
+ foreach(const Document &doc, documents) {
info.docNumber = doc.docNumber;
info.frequency = doc.frequency;
info.documentUrl = documentList.at(doc.docNumber).at(1);
@@ -519,7 +519,7 @@ void QHelpSearchIndexReaderDefault::run()
mutex.unlock();
QString queryTerm;
- foreach (const QHelpSearchQuery query, queryList) {
+ foreach (const QHelpSearchQuery &query, queryList) {
if (query.fieldName == QHelpSearchQuery::DEFAULT) {
queryTerm = query.wordList.at(0);
break;
@@ -541,7 +541,7 @@ void QHelpSearchIndexReaderDefault::run()
// setup the reader
m_reader.setIndexPath(indexPath);
- foreach(const QString namespaceName, registeredDocs) {
+ foreach(const QString &namespaceName, registeredDocs) {
mutex.lock();
if (m_cancel) {
mutex.unlock();
@@ -553,7 +553,7 @@ void QHelpSearchIndexReaderDefault::run()
const QList<QStringList> attributeSets =
engine.filterAttributeSets(namespaceName);
- foreach (QStringList attributes, attributeSets) {
+ foreach (const QStringList &attributes, attributeSets) {
// read all index files
m_reader.setIndexFile(namespaceName, attributes.join(QLatin1String("@")));
if (!m_reader.readIndex()) {
@@ -577,7 +577,7 @@ void QHelpSearchIndexReaderDefault::run()
QVector<DocumentInfo> hits = m_reader.hits();
if (!hits.isEmpty()) {
if (termSeq.isEmpty()) {
- foreach (const DocumentInfo docInfo, hits) {
+ foreach (const DocumentInfo &docInfo, hits) {
mutex.lock();
if (m_cancel) {
mutex.unlock();
@@ -588,7 +588,7 @@ void QHelpSearchIndexReaderDefault::run()
hitList.append(qMakePair(docInfo.documentTitle, docInfo.documentUrl));
}
} else {
- foreach (const DocumentInfo docInfo, hits) {
+ foreach (const DocumentInfo &docInfo, hits) {
mutex.lock();
if (m_cancel) {
mutex.unlock();
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_default.cpp b/tools/assistant/lib/qhelpsearchindexwriter_default.cpp
index 108be97..6d09fb8 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);
}
@@ -126,9 +126,9 @@ void Writer::removeIndex() const
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 @@ 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();
}
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp
index ab48dac..1634a0d 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.cpp
+++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp
@@ -121,17 +121,17 @@ private:
void retranslate()
{
- simpleSearchLabel->setText(tr("Search for:"));
- prevQueryButton->setToolTip(tr("Previous search"));
- nextQueryButton->setToolTip(tr("Next search"));
- searchButton->setText(tr("Search"));
+ simpleSearchLabel->setText(QHelpSearchQueryWidget::tr("Search for:"));
+ prevQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Previous search"));
+ nextQueryButton->setToolTip(QHelpSearchQueryWidget::tr("Next search"));
+ searchButton->setText(QHelpSearchQueryWidget::tr("Search"));
#ifdef QT_CLUCENE_SUPPORT
- advancedSearchLabel->setText(tr("Advanced search"));
- similarLabel->setText(tr("words <B>similar</B> to:"));
- withoutLabel->setText(tr("<B>without</B> the words:"));
- exactLabel->setText(tr("with <B>exact phrase</B>:"));
- allLabel->setText(tr("with <B>all</B> of the words:"));
- atLeastLabel->setText(tr("with <B>at least one</B> of the words:"));
+ advancedSearchLabel->setText(QHelpSearchQueryWidget::tr("Advanced search"));
+ similarLabel->setText(QHelpSearchQueryWidget::tr("words <B>similar</B> to:"));
+ withoutLabel->setText(QHelpSearchQueryWidget::tr("<B>without</B> the words:"));
+ exactLabel->setText(QHelpSearchQueryWidget::tr("with <B>exact phrase</B>:"));
+ allLabel->setText(QHelpSearchQueryWidget::tr("with <B>all</B> of the words:"));
+ atLeastLabel->setText(QHelpSearchQueryWidget::tr("with <B>at least one</B> of the words:"));
#endif
}
@@ -290,7 +290,7 @@ private slots:
QString::SkipEmptyParts);
if (!lst.isEmpty()) {
QStringList fuzzy;
- foreach (const QString term, lst)
+ foreach (const QString &term, lst)
fuzzy += buildTermList(term);
queryList.append(QHelpSearchQuery(QHelpSearchQuery::FUZZY,
fuzzy));
@@ -299,7 +299,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(term);
queryList.append(QHelpSearchQuery(QHelpSearchQuery::WITHOUT,
without));
@@ -315,7 +315,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(term);
queryList.append(QHelpSearchQuery(QHelpSearchQuery::ALL, all));
}
@@ -323,7 +323,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(term);
queryList.append(QHelpSearchQuery(QHelpSearchQuery::ATLEAST,
atLeast));
@@ -512,7 +512,7 @@ QHelpSearchQueryWidget::~QHelpSearchQueryWidget()
}
/*!
- Returns a list of querys to use in combination with the search engines
+ Returns a list of queries to use in combination with the search engines
search(QList<QHelpSearchQuery> &query) function.
*/
QList<QHelpSearchQuery> QHelpSearchQueryWidget::query() const
diff --git a/tools/assistant/lib/qhelpsearchresultwidget.cpp b/tools/assistant/lib/qhelpsearchresultwidget.cpp
index a3f5aed..ad540c6 100644
--- a/tools/assistant/lib/qhelpsearchresultwidget.cpp
+++ b/tools/assistant/lib/qhelpsearchresultwidget.cpp
@@ -73,7 +73,7 @@ public:
void showResultPage(const QList<QHelpSearchEngine::SearchHit> hits)
{
- foreach (const QHelpSearchEngine::SearchHit hit, hits)
+ foreach (const QHelpSearchEngine::SearchHit &hit, hits)
new QTreeWidgetItem(this, QStringList(hit.first) << hit.second);
}
@@ -118,7 +118,7 @@ public:
.arg(tr("The search results may not be complete since the "
"documentation is still being indexed!"));
- foreach (const QHelpSearchEngine::SearchHit hit, hits) {
+ foreach (const QHelpSearchEngine::SearchHit &hit, hits) {
htmlFile += QString(QLatin1String("<div style=\"text-align:left; font-weight:bold\""
"><a href=\"%1\">%2</a><div style=\"color:green; font-weight:normal;"
" margin:5px\">%1</div></div><p></p>"))