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 | |
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')
-rw-r--r-- | src/gui/image/qxpmhandler.cpp | 5 | ||||
-rw-r--r-- | src/gui/painting/qcolor_p.cpp | 5 | ||||
-rw-r--r-- | src/gui/text/qcssparser.cpp | 7 | ||||
-rw-r--r-- | src/gui/text/qfontsubset_agl.cpp | 5 | ||||
-rw-r--r-- | src/gui/text/qtexthtmlparser.cpp | 13 |
5 files changed, 35 insertions, 0 deletions
diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp index 528bd4ebb1..5edb866b62 100644 --- a/src/gui/image/qxpmhandler.cpp +++ b/src/gui/image/qxpmhandler.cpp @@ -742,6 +742,11 @@ static const struct XPMRGBData { { QRGB(139,139, 0), "yellow4" }, { QRGB(154,205, 50), "yellowgreen" } }; +#if defined(Q_CC_MSVC) && _MSC_VER < 1600 +inline bool operator<(const XPMRGBData &data1, const XPMRGBData &data2) +{ return qstrcmp(data1.name, data2.name) < 0; } +#endif + inline bool operator<(const char *name, const XPMRGBData &data) { return qstrcmp(name, data.name) < 0; } inline bool operator<(const XPMRGBData &data, const char *name) diff --git a/src/gui/painting/qcolor_p.cpp b/src/gui/painting/qcolor_p.cpp index 3f6326fcbe..72b6279b2f 100644 --- a/src/gui/painting/qcolor_p.cpp +++ b/src/gui/painting/qcolor_p.cpp @@ -289,6 +289,11 @@ static const int rgbTblSize = sizeof(rgbTbl) / sizeof(RGBData); #undef rgb +#if defined(Q_CC_MSVC) && _MSC_VER < 1600 +inline bool operator<(const RGBData &data1, const RGBData &data2) +{ return qstrcmp(data1.name, data2.name) < 0; } +#endif + inline bool operator<(const char *name, const RGBData &data) { return qstrcmp(name, data.name) < 0; } inline bool operator<(const RGBData &data, const char *name) diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index 7a96fbe88b..9c7a57df3d 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -347,6 +347,13 @@ static const QCssKnownValue styleFeatures[NumKnownStyleFeatures - 1] = { { "none", StyleFeature_None } }; +#if defined(Q_CC_MSVC) && _MSC_VER < 1600 +Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCssKnownValue &prop1, const QCssKnownValue &prop2) +{ + return QString::compare(QString::fromLatin1(prop1.name), QLatin1String(prop2.name), Qt::CaseInsensitive) < 0; +} +#endif + Q_STATIC_GLOBAL_OPERATOR bool operator<(const QString &name, const QCssKnownValue &prop) { return QString::compare(name, QLatin1String(prop.name), Qt::CaseInsensitive) < 0; diff --git a/src/gui/text/qfontsubset_agl.cpp b/src/gui/text/qfontsubset_agl.cpp index 194ecb7ab5..a2c8f7b0a0 100644 --- a/src/gui/text/qfontsubset_agl.cpp +++ b/src/gui/text/qfontsubset_agl.cpp @@ -125,6 +125,11 @@ struct AGLEntry { unsigned short index; }; +#if defined(Q_CC_MSVC) && _MSC_VER < 1600 +inline bool operator<(AGLEntry entry1, AGLEntry entry2) +{ return entry1.uc < entry2.uc; } +#endif + inline bool operator<(unsigned short uc, AGLEntry entry) { return uc < entry.uc; } inline bool operator<(AGLEntry entry, unsigned short uc) 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) { |