diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/image/qimage_ssse3.cpp | 4 | ||||
-rw-r--r-- | src/gui/image/qxpmhandler.cpp | 5 | ||||
-rw-r--r-- | src/gui/opengl/qopenglpaintengine.cpp | 19 | ||||
-rw-r--r-- | src/gui/painting/qcolor_p.cpp | 5 | ||||
-rw-r--r-- | src/gui/painting/qdrawhelper_ssse3.cpp | 4 | ||||
-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 |
8 files changed, 39 insertions, 23 deletions
diff --git a/src/gui/image/qimage_ssse3.cpp b/src/gui/image/qimage_ssse3.cpp index 9e570a0c96..f50457c32a 100644 --- a/src/gui/image/qimage_ssse3.cpp +++ b/src/gui/image/qimage_ssse3.cpp @@ -65,10 +65,10 @@ Q_GUI_EXPORT void QT_FASTCALL qt_convert_rgb888_to_rgb32_ssse3(quint32 *dst, con } // Mask the 4 first colors of the RGB888 vector - const __m128i shuffleMask = _mm_set_epi8(0xff, 9, 10, 11, 0xff, 6, 7, 8, 0xff, 3, 4, 5, 0xff, 0, 1, 2); + const __m128i shuffleMask = _mm_set_epi8(char(0xff), 9, 10, 11, char(0xff), 6, 7, 8, char(0xff), 3, 4, 5, char(0xff), 0, 1, 2); // Mask the 4 last colors of a RGB888 vector with an offset of 1 (so the last 3 bytes are RGB) - const __m128i shuffleMaskEnd = _mm_set_epi8(0xff, 13, 14, 15, 0xff, 10, 11, 12, 0xff, 7, 8, 9, 0xff, 4, 5, 6); + const __m128i shuffleMaskEnd = _mm_set_epi8(char(0xff), 13, 14, 15, char(0xff), 10, 11, 12, char(0xff), 7, 8, 9, char(0xff), 4, 5, 6); // Mask to have alpha = 0xff const __m128i alphaMask = _mm_set1_epi32(0xff000000); 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/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index 78f5080caf..05135519f8 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -89,12 +89,6 @@ #include <QDebug> -// ####TODO Properly #ifdef this class to use #define symbols actually defined -// by OpenGL/ES includes -#ifndef GL_FRAMEBUFFER_SRGB -#define GL_FRAMEBUFFER_SRGB 0x8DB9 -#endif - QT_BEGIN_NAMESPACE @@ -1860,25 +1854,12 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type } } - bool srgbFrameBufferEnabled = false; - if (funcs.hasOpenGLExtension(QOpenGLExtensions::SRGBFrameBuffer)) { - if (false) - { - glEnable(GL_FRAMEBUFFER_SRGB); - srgbFrameBufferEnabled = true; - } - } - #if defined(QT_OPENGL_DRAWCACHEDGLYPHS_INDEX_ARRAY_VBO) glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); #else glDrawElements(GL_TRIANGLE_STRIP, 6 * numGlyphs, GL_UNSIGNED_SHORT, elementIndices.data()); #endif - - if (srgbFrameBufferEnabled) - glDisable(GL_FRAMEBUFFER_SRGB); - } void QOpenGL2PaintEngineEx::drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap, 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/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp index c6f532ca77..59882f3ae3 100644 --- a/src/gui/painting/qdrawhelper_ssse3.cpp +++ b/src/gui/painting/qdrawhelper_ssse3.cpp @@ -103,7 +103,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src) if (!minusOffsetToAlignSrcOn16Bytes) {\ /* src is aligned, usual algorithm but with aligned operations.\ See the SSE2 version for more documentation on the algorithm itself. */\ - const __m128i alphaShuffleMask = _mm_set_epi8(0xff,15,0xff,15,0xff,11,0xff,11,0xff,7,0xff,7,0xff,3,0xff,3);\ + const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);\ for (; x < length-3; x += 4) { \ const __m128i srcVector = _mm_load_si128((__m128i *)&src[x]); \ const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \ @@ -124,7 +124,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src) __m128i srcVectorPrevLoaded = _mm_load_si128((__m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes]);\ const int palignrOffset = minusOffsetToAlignSrcOn16Bytes << 2;\ \ - const __m128i alphaShuffleMask = _mm_set_epi8(0xff,15,0xff,15,0xff,11,0xff,11,0xff,7,0xff,7,0xff,3,0xff,3);\ + const __m128i alphaShuffleMask = _mm_set_epi8(char(0xff),15,char(0xff),15,char(0xff),11,char(0xff),11,char(0xff),7,char(0xff),7,char(0xff),3,char(0xff),3);\ switch (palignrOffset) {\ case 4:\ BLENDING_LOOP(4, length)\ 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) { |