diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 5c1cd8adefc..52843fa113b 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -379,9 +379,9 @@ static const uint *QT_FASTCALL convertARGBPMFromARGB32PM(uint *buffer, const uin template Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutRGB() { return QPixelLayout{ - redWidth(), redShift(), - greenWidth(), greenShift(), - blueWidth(), blueShift(), + uchar(redWidth()), uchar(redShift()), + uchar(greenWidth()), uchar(greenShift()), + uchar(blueWidth()), uchar(blueShift()), 0, 0, false, bitsPerPixel(), convertToRGB32, @@ -394,10 +394,10 @@ template Q_DECL_CONSTEXPR static inline QPixelLayout pixe template Q_DECL_CONSTEXPR static inline QPixelLayout pixelLayoutARGBPM() { return QPixelLayout{ - redWidth(), redShift(), - greenWidth(), greenShift(), - blueWidth(), blueShift(), - alphaWidth(), alphaShift(), + uchar(redWidth()), uchar(redShift()), + uchar(greenWidth()), uchar(greenShift()), + uchar(blueWidth()), uchar(blueShift()), + uchar(alphaWidth()), uchar(alphaShift()), true, bitsPerPixel(), convertARGBPMToARGB32PM, convertARGBPMFromARGB32PM,