diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/assistant/help/qhelpprojectdata.cpp | 8 | ||||
-rw-r--r-- | src/assistant/help/qhelpsearchindexreader_clucene.cpp | 4 | ||||
-rw-r--r-- | src/assistant/help/qhelpsearchquerywidget.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/assistant/help/qhelpprojectdata.cpp b/src/assistant/help/qhelpprojectdata.cpp index f48fdea9b..fa084ff3c 100644 --- a/src/assistant/help/qhelpprojectdata.cpp +++ b/src/assistant/help/qhelpprojectdata.cpp @@ -275,13 +275,13 @@ void QHelpProjectDataPrivate::addMatchingFiles(const QString &pattern) { // The pattern matching is expensive, so we skip it if no // wildcard symbols occur in the string. - if (!pattern.contains('?') && !pattern.contains('*') - && !pattern.contains('[') && !pattern.contains(']')) { + if (!pattern.contains(QLatin1Char('?')) && !pattern.contains(QLatin1Char('*')) + && !pattern.contains(QLatin1Char('[')) && !pattern.contains(QLatin1Char(']'))) { filterSectionList.last().addFile(pattern); return; } - QFileInfo fileInfo(rootPath + '/' + pattern); + QFileInfo fileInfo(rootPath + QLatin1Char('/') + pattern); const QDir &dir = fileInfo.dir(); const QString &path = dir.canonicalPath(); @@ -303,7 +303,7 @@ void QHelpProjectDataPrivate::addMatchingFiles(const QString &pattern) if (regExp.exactMatch(file)) { matchFound = true; filterSectionList.last(). - addFile(QFileInfo(pattern).dir().path() + '/' + file); + addFile(QFileInfo(pattern).dir().path() + QLatin1Char('/') + file); } } if (!matchFound) diff --git a/src/assistant/help/qhelpsearchindexreader_clucene.cpp b/src/assistant/help/qhelpsearchindexreader_clucene.cpp index 18b128b01..a63128a88 100644 --- a/src/assistant/help/qhelpsearchindexreader_clucene.cpp +++ b/src/assistant/help/qhelpsearchindexreader_clucene.cpp @@ -270,8 +270,8 @@ bool QHelpSearchIndexReaderClucene::buildTryHarderQuery( bool QHelpSearchIndexReaderClucene::isNegativeQuery(const QHelpSearchQuery &query) const { - const QString &search = query.wordList.join(" "); - return search.contains('!') || search.contains('-') + const QString &search = query.wordList.join(QLatin1Char(' ')); + return search.contains(QLatin1Char('!')) || search.contains(QLatin1Char('-')) || search.contains(QLatin1String(" NOT ")); } diff --git a/src/assistant/help/qhelpsearchquerywidget.cpp b/src/assistant/help/qhelpsearchquerywidget.cpp index 46f6fdfbd..e0b481e58 100644 --- a/src/assistant/help/qhelpsearchquerywidget.cpp +++ b/src/assistant/help/qhelpsearchquerywidget.cpp @@ -212,7 +212,7 @@ private: queryHist.queries.append(query); foreach (const QHelpSearchQuery &queryPart, query) { static_cast<CompleterModel *>(searchCompleter.model())-> - addTerm(queryPart.wordList.join(" ")); + addTerm(queryPart.wordList.join(QLatin1Char(' '))); } } } @@ -241,7 +241,7 @@ private: queryHist->queries.at(queryHist->curQuery); foreach (const QHelpSearchQuery &queryPart, query) { if (QLineEdit *lineEdit = lineEditFor(queryPart.fieldName)) - lineEdit->setText(queryPart.wordList.join(" ")); + lineEdit->setText(queryPart.wordList.join(QLatin1Char(' '))); } if (queryHist->curQuery == maxOrMinIndex) |