summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-11-04 11:55:24 +0200
committerMartin Storsjö <martin@martin.st>2020-11-05 14:04:55 +0200
commit48faa8ed5a34f0780cded4546547cee96fc1dc2f (patch)
tree552ce50b06fa3c18365462f456acb67896619e34 /src/gui/image/qimage.cpp
parent66d2bf7659691167f4e4e48a281774e25a887960 (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 Pick-to: 5.15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r--src/gui/image/qimage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index b973b1c6a0..6edf48d3ba 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -181,7 +181,7 @@ QImageData::~QImageData()
data = nullptr;
}
-#if defined(_M_ARM)
+#if defined(_M_ARM) && defined(_MSC_VER)
#pragma optimize("", off)
#endif
@@ -311,7 +311,7 @@ bool QImageData::checkForAlphaPixels() const
return has_alpha_pixels;
}
-#if defined(_M_ARM)
+#if defined(_M_ARM) && defined(_MSC_VER)
#pragma optimize("", on)
#endif