summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage_p.h
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-11-04 11:55:24 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-11-05 19:58:25 +0000
commit018daa1a28e42c69d542610c4595d344f382008e (patch)
tree4892d5cc5117b0c934c54de4ada0d02974de7c06 /src/gui/image/qimage_p.h
parent7d9f0cd3929474767fdad554f7cee4539689ce8f (diff)
Add _MSC_VER check to MSVC ARM compiler workaround
While _M_ARM is a MSVC specific builtin define, mingw headers do also define it (in code, as opposed to a compiler built in define), just as the same headers do for e.g. _M_IX86 and _M_X64. This avoids warnings about unrecognized pragmas, when compiling for armv7 mingw. The original compiler bug (from QTBUG-42038) probably already is fixed and/or no longer in scope. Change-Id: I98722e2a7ee1de4f1937a866555ec460f5d898d1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 48faa8ed5a34f0780cded4546547cee96fc1dc2f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/image/qimage_p.h')
-rw-r--r--src/gui/image/qimage_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index 03ec43eaf7..eb44a0190d 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -167,7 +167,7 @@ void dither_to_Mono(QImageData *dst, const QImageData *src, Qt::ImageConversionF
const uchar *qt_get_bitflip_array();
Q_GUI_EXPORT void qGamma_correct_back_to_linear_cs(QImage *image);
-#if defined(_M_ARM) // QTBUG-42038
+#if defined(_M_ARM) && defined(_MSC_VER) // QTBUG-42038
#pragma optimize("", off)
#endif
inline int qt_depthForFormat(QImage::Format format)
@@ -222,7 +222,7 @@ inline int qt_depthForFormat(QImage::Format format)
return depth;
}
-#if defined(_M_ARM)
+#if defined(_M_ARM) && defined(_MSC_VER)
#pragma optimize("", on)
#endif