QtGui: Raise minimum supported MSVC version to 2015

Remove code for older versions and streamline #ifdefs.

Task-number: QTBUG-51673
Change-Id: I841f1880371db79723747fb9686ba466fd66c26f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
Friedemann Kleint 2018-01-04 14:24:32 +01:00
parent a7600bf604
commit a468a0541a
7 changed files with 2 additions and 45 deletions

View File

@ -241,7 +241,7 @@ static bool write_xbm_image(const QImage &sourceImage, QIODevice *device, const
} }
} }
} }
#if defined(_MSC_VER) && _MSC_VER >= 1400 #ifdef Q_CC_MSVC
strcpy_s(p, sizeof(" };\n"), " };\n"); strcpy_s(p, sizeof(" };\n"), " };\n");
#else #else
strcpy(p, " };\n"); strcpy(p, " };\n");

View File

@ -741,10 +741,6 @@ static const struct XPMRGBData {
{ QRGB(139,139, 0), "yellow4" }, { QRGB(139,139, 0), "yellow4" },
{ QRGB(154,205, 50), "yellowgreen" } }; { 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) inline bool operator<(const char *name, const XPMRGBData &data)
{ return qstrcmp(name, data.name) < 0; } { return qstrcmp(name, data.name) < 0; }

View File

@ -239,7 +239,7 @@ typedef unsigned long long int uint64_t;
typedef long int int32_t; typedef long int int32_t;
typedef long long int int64_t; typedef long long int int64_t;
typedef unsigned long long int uint64_t; typedef unsigned long long int uint64_t;
#elif defined(_WIN32) && (defined(__GNUC__) || (defined(_MSC_VER) && _MSC_VER >= 1600)) #elif defined(_WIN32) && (defined(__GNUC__) || defined(_MSC_VER))
#include <stdint.h> #include <stdint.h>
#elif defined(_WIN32) #elif defined(_WIN32)
typedef __int32 int32_t; typedef __int32 int32_t;

View File

@ -304,11 +304,6 @@ static const int rgbTblSize = sizeof(rgbTbl) / sizeof(RGBData);
#undef rgb #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) inline bool operator<(const char *name, const RGBData &data)
{ return qstrcmp(name, data.name) < 0; } { return qstrcmp(name, data.name) < 0; }
inline bool operator<(const RGBData &data, const char *name) inline bool operator<(const RGBData &data, const char *name)

View File

@ -345,13 +345,6 @@ static const QCssKnownValue styleFeatures[NumKnownStyleFeatures - 1] = {
{ "none", StyleFeature_None } { "none", StyleFeature_None }
}; };
#if defined(Q_CC_MSVC) && _MSC_VER < 1600
static bool operator<(const QCssKnownValue &prop1, const QCssKnownValue &prop2)
{
return QString::compare(QString::fromLatin1(prop1.name), QLatin1String(prop2.name), Qt::CaseInsensitive) < 0;
}
#endif
static 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; return QString::compare(name, QLatin1String(prop.name), Qt::CaseInsensitive) < 0;

View File

@ -399,26 +399,6 @@ static bool operator<(const QCheckPoint &checkPoint, int pos)
return checkPoint.positionInFrame < pos; return checkPoint.positionInFrame < pos;
} }
#if defined(Q_CC_MSVC) && _MSC_VER < 1600
//The STL implementation of MSVC 2008 requires the definitions
static bool operator<(const QCheckPoint &checkPoint1, const QCheckPoint &checkPoint2)
{
return checkPoint1.y < checkPoint2.y;
}
static bool operator<(QFixed y, const QCheckPoint &checkPoint)
{
return y < checkPoint.y;
}
static bool operator<(int pos, const QCheckPoint &checkPoint)
{
return pos < checkPoint.positionInFrame;
}
#endif
static void fillBackground(QPainter *p, const QRectF &rect, QBrush brush, const QPointF &origin, const QRectF &gradientRect = QRectF()) static void fillBackground(QPainter *p, const QRectF &rect, QBrush brush, const QPointF &origin, const QRectF &gradientRect = QRectF())
{ {
p->save(); p->save();

View File

@ -448,13 +448,6 @@ static const QTextHtmlElement elements[Html_NumElements]= {
{ "var", Html_var, QTextHtmlElement::DisplayInline }, { "var", Html_var, QTextHtmlElement::DisplayInline },
}; };
#if defined(Q_CC_MSVC) && _MSC_VER < 1600
static bool operator<(const QTextHtmlElement &e1, const QTextHtmlElement &e2)
{
return QLatin1String(e1.name) < QLatin1String(e2.name);
}
#endif
static bool operator<(const QString &str, const QTextHtmlElement &e) static bool operator<(const QString &str, const QTextHtmlElement &e)
{ {
return str < QLatin1String(e.name); return str < QLatin1String(e.name);