diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2014-12-22 14:21:41 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2015-01-06 10:23:44 +0100 |
commit | 83ceb7e9e64b7ce7dbdad9973ec3bcb2941030d1 (patch) | |
tree | 7d467f82df4b3de183fb92a861a461b465f7e89f /src | |
parent | 3081a0182457fef868c5f1f94eef0a77c4144995 (diff) | |
download | qttools-83ceb7e9e64b7ce7dbdad9973ec3bcb2941030d1.tar.gz |
Remove qBinaryFind usage from Qt Assistant.
It was omitted in commit 49998cea897fa4c5d410ce07bd53f0d1ee0fd180
(QtAlgorithms is getting deprecated).
Also remove the overload of operator<() which becomes unused with
std::lower_bound().
Change-Id: Iaee3c464e3107c8c3c34def9fa762f22dbd8d510
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/assistant/help/qhelpsearchindexwriter_clucene.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/assistant/help/qhelpsearchindexwriter_clucene.cpp b/src/assistant/help/qhelpsearchindexwriter_clucene.cpp index 5574ec9bb..55c380db9 100644 --- a/src/assistant/help/qhelpsearchindexwriter_clucene.cpp +++ b/src/assistant/help/qhelpsearchindexwriter_clucene.cpp @@ -52,6 +52,8 @@ #include <QtNetwork/QLocalSocket> #include <QtNetwork/QLocalServer> +#include <algorithm> + #include "private/qfunctions_p.h" QT_BEGIN_NAMESPACE @@ -325,11 +327,6 @@ static const struct QTextHtmlEntity { "zwnj", 0x200c } }; -Q_STATIC_GLOBAL_OPERATOR bool operator<(const QString &entityStr, const QTextHtmlEntity &entity) -{ - return entityStr < QLatin1String(entity.name); -} - Q_STATIC_GLOBAL_OPERATOR bool operator<(const QTextHtmlEntity &entity, const QString &entityStr) { return QLatin1String(entity.name) < entityStr; @@ -339,7 +336,7 @@ static QChar resolveEntity(const QString &entity) { const QTextHtmlEntity *start = &entities[0]; const QTextHtmlEntity *end = &entities[(sizeof(entities) / sizeof(entities[0]))]; - const QTextHtmlEntity *e = qBinaryFind(start, end, entity); + const QTextHtmlEntity *e = std::lower_bound(start, end, entity); if (e == end) return QChar(); return e->code; |