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:
parent
a7600bf604
commit
a468a0541a
@ -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");
|
||||||
|
@ -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; }
|
||||||
|
@ -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;
|
||||||
|
@ -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)
|
||||||
|
@ -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;
|
||||||
|
@ -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();
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user