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 <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
bb10
Thiago Macieira 2014-12-17 18:27:41 -08:00
parent 0f569f5900
commit 79eef021cb
7 changed files with 18 additions and 26 deletions

View File

@ -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

View File

@ -45,7 +45,6 @@
#include "qstringlist.h"
#include "qstringmatcher.h"
#include "qvector.h"
#include "private/qfunctions_p.h"
#include <limits.h>
#include <algorithm>
@ -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;

View File

@ -41,7 +41,6 @@
#include <qfontmetrics.h>
#include <qbrush.h>
#include <qimagereader.h>
#include "private/qfunctions_p.h"
#include <algorithm>
@ -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;
}

View File

@ -36,7 +36,6 @@
#include <qendian.h>
#include <qpainterpath.h>
#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<QTtfTable> 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;
}

View File

@ -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;
}

View File

@ -45,7 +45,6 @@
#include "qtextdocument_p.h"
#include "qtextcursor.h"
#include "qfont_p.h"
#include "private/qfunctions_p.h"
#include <algorithm>
@ -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;
}

View File

@ -37,7 +37,6 @@
#include <qdebug.h>
#include "qtexttable_p.h"
#include "qvarlengtharray.h"
#include "private/qfunctions_p.h"
#include <algorithm>
#include <stdlib.h>
@ -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);
}