diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2013-09-25 15:29:37 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-25 17:22:52 +0200 |
commit | 774d74df91869d1178cbcdc7648994576a47f850 (patch) | |
tree | 76985fbf7d6c9d3464a37faad43c8126b73c975e /src/gui/text/qtexthtmlparser.cpp | |
parent | 25f7cddcab00b8906311950630a1fcee773b46a5 (diff) |
Fix WinCE/MSVC2008 build errors related to std::lower_bound patches.
See QTBUG-33473 for more information about this compiler bug.
Change-Id: I13b945350fdc38165c1515f0cdd75a53cf37cd6c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r-- | src/gui/text/qtexthtmlparser.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index c177fa0810..952cebcc1b 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -324,6 +324,13 @@ static const struct QTextHtmlEntity { const char *name; quint16 code; } entities { "zwnj", 0x200c } }; +#if defined(Q_CC_MSVC) && _MSC_VER < 1600 +bool operator<(const QTextHtmlEntity &entity1, const QTextHtmlEntity &entity2) +{ + return QLatin1String(entity1.name) < QLatin1String(entity2.name); +} +#endif + Q_STATIC_GLOBAL_OPERATOR bool operator<(const QString &entityStr, const QTextHtmlEntity &entity) { return entityStr < QLatin1String(entity.name); @@ -443,6 +450,12 @@ static const QTextHtmlElement elements[Html_NumElements]= { { "var", Html_var, QTextHtmlElement::DisplayInline }, }; +#if defined(Q_CC_MSVC) && _MSC_VER < 1600 +Q_STATIC_GLOBAL_OPERATOR bool operator<(const QTextHtmlElement &e1, const QTextHtmlElement &e2) +{ + return QLatin1String(e1.name) < QLatin1String(e2.name); +} +#endif Q_STATIC_GLOBAL_OPERATOR bool operator<(const QString &str, const QTextHtmlElement &e) { |