summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-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.cpp16
-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.cpp16
-rw-r--r--tools/assistant/lib/qhelpsearchresultwidget.cpp4
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp2
-rw-r--r--tools/designer/src/designer/qdesigner_server.h2
-rw-r--r--tools/designer/src/designer/versiondialog.cpp5
-rw-r--r--tools/designer/src/lib/shared/qdesigner_taskmenu.cpp2
-rw-r--r--tools/designer/src/plugins/widgets/q3table/q3table_plugin.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h6
-rw-r--r--tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h2
-rw-r--r--tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h2
-rw-r--r--tools/linguist/shared/qm.cpp2
-rw-r--r--tools/shared/findwidget/abstractfindwidget.h2
-rw-r--r--tools/shared/findwidget/itemviewfindwidget.h2
24 files changed, 76 insertions, 77 deletions
diff --git a/tools/assistant/lib/fulltextsearch/qclucene-config_p.h b/tools/assistant/lib/fulltextsearch/qclucene-config_p.h
index 729ae72cee..0c70718d70 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 fe0c417d93..cb7e457b91 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;
}
@@ -323,7 +323,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();
@@ -346,7 +346,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]);
@@ -400,7 +400,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);
@@ -499,7 +499,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 3986afba42..a80dc3963c 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 904124b5ba..6dd949afc2 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 0911d59e41..066e4d50d2 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;
@@ -531,7 +531,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 324f67d630..4b94ebfff0 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -203,7 +203,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;
@@ -367,7 +367,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;
@@ -629,7 +629,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();
@@ -664,7 +664,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]);
@@ -687,7 +687,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();
@@ -704,7 +704,7 @@ bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> keywords,
int i = 0;
d->query->exec(QLatin1String("BEGIN"));
- foreach (QHelpDataIndexItem itm, keywords) {
+ foreach (const QHelpDataIndexItem &itm, keywords) {
pos = itm.reference.indexOf(QLatin1Char('#'));
fileName = itm.reference.left(pos);
if (pos > -1)
@@ -773,7 +773,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);
@@ -798,7 +798,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 6757805fc4..270bcddacb 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 c28947bf3f..7c2635de1d 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 1bc5febf58..d2241a5d11 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 108be972fb..6d09fb8008 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 f2bb816f01..3c3919e660 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.cpp
+++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp
@@ -148,15 +148,15 @@ 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(""));
}
if (retValue.trimmed().isEmpty())
return retValue;
- retValue = text; // now realy escape the string...
- foreach (const QString escapeChar, escapableCharsList) {
+ retValue = text; // now really escape the string...
+ 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));
}
@@ -533,7 +533,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 a3f5aed396..ad540c601b 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>"))
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index 055fa1c575..0e4096b0c8 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -1118,7 +1118,7 @@ CentralWidget::highlightSearchTerms()
QList<QHelpSearchQuery> queryList = searchEngine->query();
QStringList terms;
- foreach (QHelpSearchQuery query, queryList) {
+ foreach (const QHelpSearchQuery &query, queryList) {
switch (query.fieldName) {
default: break;
case QHelpSearchQuery::ALL: {
diff --git a/tools/designer/src/designer/qdesigner_server.h b/tools/designer/src/designer/qdesigner_server.h
index d522056c02..90cc624316 100644
--- a/tools/designer/src/designer/qdesigner_server.h
+++ b/tools/designer/src/designer/qdesigner_server.h
@@ -74,7 +74,7 @@ class QDesignerClient: public QObject
{
Q_OBJECT
public:
- QDesignerClient(quint16 port, QObject *parent = 0);
+ explicit QDesignerClient(quint16 port, QObject *parent = 0);
virtual ~QDesignerClient();
private slots:
diff --git a/tools/designer/src/designer/versiondialog.cpp b/tools/designer/src/designer/versiondialog.cpp
index 51f546daee..d9b03aa6eb 100644
--- a/tools/designer/src/designer/versiondialog.cpp
+++ b/tools/designer/src/designer/versiondialog.cpp
@@ -113,15 +113,14 @@ void VersionLabel::mouseReleaseEvent(QMouseEvent *me)
if (!secondStage) {
m_path.lineTo(me->pos());
bool gotIt = true;
- QPoint pt;
- foreach(pt, hitPoints) {
+ foreach(const QPoint &pt, hitPoints) {
if (!m_path.contains(pt)) {
gotIt = false;
break;
}
}
if (gotIt) {
- foreach(pt, missPoints) {
+ foreach(const QPoint &pt, missPoints) {
if (m_path.contains(pt)) {
gotIt = false;
break;
diff --git a/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp b/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp
index 608ecd7623..cd95f5bb72 100644
--- a/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_taskmenu.cpp
@@ -675,7 +675,7 @@ void QDesignerTaskMenu::navigateToSlot(QDesignerFormEditorInterface *core,
const QString signalSignature = selectedItem->text(0);
const QStringList parameterNames = qVariantValue<QStringList>(selectedItem->data(0, Qt::UserRole));
- // TODO: Check wether signal is connected to slot
+ // TODO: Check whether signal is connected to slot
integr->emitNavigateToSlot(objectName, signalSignature, parameterNames);
}
}
diff --git a/tools/designer/src/plugins/widgets/q3table/q3table_plugin.h b/tools/designer/src/plugins/widgets/q3table/q3table_plugin.h
index 9c02467ce8..0df5e0a2aa 100644
--- a/tools/designer/src/plugins/widgets/q3table/q3table_plugin.h
+++ b/tools/designer/src/plugins/widgets/q3table/q3table_plugin.h
@@ -51,7 +51,7 @@ class Q3TablePlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3TablePlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3TablePlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h b/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h
index 3b47f746fc..3a2ffe0c5a 100644
--- a/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h
+++ b/tools/designer/src/plugins/widgets/q3toolbar/q3toolbar_plugin.h
@@ -51,7 +51,7 @@ class Q3ToolBarPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3ToolBarPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3ToolBarPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h b/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h
index c750cfed75..f4695de4cd 100644
--- a/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h
+++ b/tools/designer/src/plugins/widgets/q3widgets/q3widget_plugins.h
@@ -133,7 +133,7 @@ class Q3DateTimeEditPlugin: public QObject, public QDesignerCustomWidgetInterfac
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3DateTimeEditPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3DateTimeEditPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
@@ -186,7 +186,7 @@ class Q3GroupBoxPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3GroupBoxPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3GroupBoxPlugin(const QIcon &icon, QObject *parent = 0);
virtual ~Q3GroupBoxPlugin();
virtual QString name() const;
@@ -239,7 +239,7 @@ class Q3TextBrowserPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3TextBrowserPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3TextBrowserPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h b/tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h
index 56dd7fb2a4..d61b4a14a1 100644
--- a/tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h
+++ b/tools/designer/src/plugins/widgets/q3widgetstack/q3widgetstack_plugin.h
@@ -51,7 +51,7 @@ class Q3WidgetStackPlugin: public QObject, public QDesignerCustomWidgetInterface
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- Q3WidgetStackPlugin(const QIcon &icon, QObject *parent = 0);
+ explicit Q3WidgetStackPlugin(const QIcon &icon, QObject *parent = 0);
virtual QString name() const;
virtual QString group() const;
diff --git a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h
index e8cf4fa54c..f96ba74ba6 100644
--- a/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h
+++ b/tools/designer/src/plugins/widgets/q3wizard/q3wizard_container.h
@@ -71,7 +71,7 @@ class Q3WizardExtraInfo: public QObject, public QDesignerExtraInfoExtension
Q_OBJECT
Q_INTERFACES(QDesignerExtraInfoExtension)
public:
- Q3WizardExtraInfo(Q3Wizard *wizard, QDesignerFormEditorInterface *core, QObject *parent);
+ explicit Q3WizardExtraInfo(Q3Wizard *wizard, QDesignerFormEditorInterface *core, QObject *parent);
virtual QWidget *widget() const;
virtual Q3Wizard *wizard() const;
diff --git a/tools/linguist/shared/qm.cpp b/tools/linguist/shared/qm.cpp
index 8118576c6d..de1284f32a 100644
--- a/tools/linguist/shared/qm.cpp
+++ b/tools/linguist/shared/qm.cpp
@@ -594,7 +594,7 @@ bool loadQM(Translator &translator, QIODevice &dev, ConversionData &cd)
return false;
}
m += 4;
- QString str = QString::fromUtf16((const ushort *)m, len/2);
+ QString str = QString((const QChar *)m, len/2);
if (QSysInfo::ByteOrder == QSysInfo::LittleEndian) {
for (int i = 0; i < str.length(); ++i)
str[i] = QChar((str.at(i).unicode() >> 8) +
diff --git a/tools/shared/findwidget/abstractfindwidget.h b/tools/shared/findwidget/abstractfindwidget.h
index 6cc7c94d68..089947da18 100644
--- a/tools/shared/findwidget/abstractfindwidget.h
+++ b/tools/shared/findwidget/abstractfindwidget.h
@@ -70,7 +70,7 @@ public:
};
Q_DECLARE_FLAGS(FindFlags, FindFlag)
- AbstractFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0);
+ explicit AbstractFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0);
virtual ~AbstractFindWidget();
bool eventFilter(QObject *object, QEvent *e);
diff --git a/tools/shared/findwidget/itemviewfindwidget.h b/tools/shared/findwidget/itemviewfindwidget.h
index 9d63d62c38..2d06df8b89 100644
--- a/tools/shared/findwidget/itemviewfindwidget.h
+++ b/tools/shared/findwidget/itemviewfindwidget.h
@@ -55,7 +55,7 @@ class ItemViewFindWidget : public AbstractFindWidget
Q_OBJECT
public:
- ItemViewFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0);
+ explicit ItemViewFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0);
QAbstractItemView *itemView() const
{ return m_itemView; }