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>
This commit is contained in:
parent
66d2bf7659
commit
48faa8ed5a
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user