From 79eef021cbd8d9789d3b2a63cca2b04c84a3ae05 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 17 Dec 2014 18:27:41 -0800 Subject: Remove Q_STATIC_GLOBALxxx_OPERATOR macros These macros existed for working around an RVCT compiler bug, but since we stopped trying to work around it, the macros are no longer necessary. Change-Id: I76cc88d863b41f74f60cd9975dcc1959778c2740 Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen Reviewed-by: Olivier Goffart --- src/corelib/kernel/qfunctions_p.h | 3 --- src/corelib/tools/qregexp.cpp | 3 +-- src/gui/text/qcssparser.cpp | 7 +++---- src/gui/text/qfontsubset.cpp | 5 ++--- src/gui/text/qtextdocumentlayout.cpp | 10 +++++----- src/gui/text/qtexthtmlparser.cpp | 11 +++++------ src/gui/text/qtexttable.cpp | 5 ++--- 7 files changed, 18 insertions(+), 26 deletions(-) diff --git a/src/corelib/kernel/qfunctions_p.h b/src/corelib/kernel/qfunctions_p.h index d0623aab6b..1eb7748364 100644 --- a/src/corelib/kernel/qfunctions_p.h +++ b/src/corelib/kernel/qfunctions_p.h @@ -57,8 +57,5 @@ # include "QtCore/qfunctions_winrt.h" #endif -#define Q_STATIC_GLOBAL_OPERATOR static -#define Q_STATIC_GLOBAL_INLINE_OPERATOR static inline - #endif diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index b679377fc0..71d897082b 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -45,7 +45,6 @@ #include "qstringlist.h" #include "qstringmatcher.h" #include "qvector.h" -#include "private/qfunctions_p.h" #include #include @@ -877,7 +876,7 @@ struct QRegExpEngineKey } }; -Q_STATIC_GLOBAL_OPERATOR bool operator==(const QRegExpEngineKey &key1, const QRegExpEngineKey &key2) +static bool operator==(const QRegExpEngineKey &key1, const QRegExpEngineKey &key2) { return key1.pattern == key2.pattern && key1.patternSyntax == key2.patternSyntax && key1.cs == key2.cs; diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp index 8c2e40f319..3e4677a85e 100644 --- a/src/gui/text/qcssparser.cpp +++ b/src/gui/text/qcssparser.cpp @@ -41,7 +41,6 @@ #include #include #include -#include "private/qfunctions_p.h" #include @@ -340,18 +339,18 @@ static const QCssKnownValue styleFeatures[NumKnownStyleFeatures - 1] = { }; #if defined(Q_CC_MSVC) && _MSC_VER < 1600 -Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCssKnownValue &prop1, const QCssKnownValue &prop2) +static 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) +static bool operator<(const QString &name, const QCssKnownValue &prop) { return QString::compare(name, QLatin1String(prop.name), Qt::CaseInsensitive) < 0; } -Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCssKnownValue &prop, const QString &name) +static bool operator<(const QCssKnownValue &prop, const QString &name) { return QString::compare(QLatin1String(prop.name), name, Qt::CaseInsensitive) < 0; } diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp index 160472cb5d..521b44b839 100644 --- a/src/gui/text/qfontsubset.cpp +++ b/src/gui/text/qfontsubset.cpp @@ -36,7 +36,6 @@ #include #include #include "private/qpdf_p.h" -#include "private/qfunctions_p.h" #include "qfontsubset_agl.cpp" @@ -979,7 +978,7 @@ static QTtfGlyph generateGlyph(int index, const QPainterPath &path, qreal advanc return glyph; } -Q_STATIC_GLOBAL_OPERATOR bool operator <(const QTtfGlyph &g1, const QTtfGlyph &g2) +static bool operator <(const QTtfGlyph &g1, const QTtfGlyph &g2) { return g1.index < g2.index; } @@ -1057,7 +1056,7 @@ static QList generateGlyphTables(qttf_font_tables &tables, const QLis return list; } -Q_STATIC_GLOBAL_OPERATOR bool operator <(const QTtfTable &t1, const QTtfTable &t2) +static bool operator <(const QTtfTable &t1, const QTtfTable &t2) { return t1.tag < t2.tag; } diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index 163d51aec2..a96a8e18e6 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -383,12 +383,12 @@ struct QCheckPoint }; Q_DECLARE_TYPEINFO(QCheckPoint, Q_PRIMITIVE_TYPE); -Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCheckPoint &checkPoint, QFixed y) +static bool operator<(const QCheckPoint &checkPoint, QFixed y) { return checkPoint.y < y; } -Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCheckPoint &checkPoint, int pos) +static bool operator<(const QCheckPoint &checkPoint, int pos) { return checkPoint.positionInFrame < pos; } @@ -396,17 +396,17 @@ Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCheckPoint &checkPoint, int pos) #if defined(Q_CC_MSVC) && _MSC_VER < 1600 //The STL implementation of MSVC 2008 requires the definitions -Q_STATIC_GLOBAL_OPERATOR bool operator<(const QCheckPoint &checkPoint1, const QCheckPoint &checkPoint2) +static bool operator<(const QCheckPoint &checkPoint1, const QCheckPoint &checkPoint2) { return checkPoint1.y < checkPoint2.y; } -Q_STATIC_GLOBAL_OPERATOR bool operator<(QFixed y, const QCheckPoint &checkPoint) +static bool operator<(QFixed y, const QCheckPoint &checkPoint) { return y < checkPoint.y; } -Q_STATIC_GLOBAL_OPERATOR bool operator<(int pos, const QCheckPoint &checkPoint) +static bool operator<(int pos, const QCheckPoint &checkPoint) { return pos < checkPoint.positionInFrame; } diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 47b090edc9..c7237e9e38 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -45,7 +45,6 @@ #include "qtextdocument_p.h" #include "qtextcursor.h" #include "qfont_p.h" -#include "private/qfunctions_p.h" #include @@ -323,12 +322,12 @@ bool operator<(const QTextHtmlEntity &entity1, const QTextHtmlEntity &entity2) } #endif -Q_STATIC_GLOBAL_OPERATOR bool operator<(const QString &entityStr, const QTextHtmlEntity &entity) +static 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) +static bool operator<(const QTextHtmlEntity &entity, const QString &entityStr) { return QLatin1String(entity.name) < entityStr; } @@ -443,18 +442,18 @@ static const QTextHtmlElement elements[Html_NumElements]= { }; #if defined(Q_CC_MSVC) && _MSC_VER < 1600 -Q_STATIC_GLOBAL_OPERATOR bool operator<(const QTextHtmlElement &e1, const QTextHtmlElement &e2) +static 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) +static bool operator<(const QString &str, const QTextHtmlElement &e) { return str < QLatin1String(e.name); } -Q_STATIC_GLOBAL_OPERATOR bool operator<(const QTextHtmlElement &e, const QString &str) +static bool operator<(const QTextHtmlElement &e, const QString &str) { return QLatin1String(e.name) < str; } diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp index c2cc822ad6..7bb7056395 100644 --- a/src/gui/text/qtexttable.cpp +++ b/src/gui/text/qtexttable.cpp @@ -37,7 +37,6 @@ #include #include "qtexttable_p.h" #include "qvarlengtharray.h" -#include "private/qfunctions_p.h" #include #include @@ -371,12 +370,12 @@ struct QFragmentFindHelper const QTextDocumentPrivate::FragmentMap &fragmentMap; }; -Q_STATIC_GLOBAL_INLINE_OPERATOR bool operator<(int fragment, const QFragmentFindHelper &helper) +static inline bool operator<(int fragment, const QFragmentFindHelper &helper) { return helper.fragmentMap.position(fragment) < helper.pos; } -Q_STATIC_GLOBAL_INLINE_OPERATOR bool operator<(const QFragmentFindHelper &helper, int fragment) +static inline bool operator<(const QFragmentFindHelper &helper, int fragment) { return helper.pos < helper.fragmentMap.position(fragment); } -- cgit v1.2.3