From 978131ba7106df99e010f5ea5559204424f29ab7 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 14 Jan 2021 15:13:42 +0100 Subject: Fix convertToRGBA64PM for Grayscale16 The input has been fetch into a set of uint32s, so no longer a string of ushorts. Fixes: QTBUG-90246 Change-Id: Id52a6824317b0744310008cc2ce2f726539b4c8c Reviewed-by: Eirik Aavitsland (cherry picked from commit ade24763c74ce506276218ec1ce0e307301717fe) Reviewed-by: Qt Cherry-pick Bot --- src/gui/painting/qpixellayout.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/painting/qpixellayout.cpp b/src/gui/painting/qpixellayout.cpp index 0b1e736ec8..3b05e98318 100644 --- a/src/gui/painting/qpixellayout.cpp +++ b/src/gui/painting/qpixellayout.cpp @@ -783,9 +783,8 @@ static const uint *QT_FASTCALL fetchGrayscale16ToRGB32(uint *buffer, const uchar static const QRgba64 *QT_FASTCALL convertGrayscale16ToRGBA64(QRgba64 *buffer, const uint *src, int count, const QList *, QDitherInfo *) { - const unsigned short *s = reinterpret_cast(src); for (int i = 0; i < count; ++i) - buffer[i] = QRgba64::fromRgba64(s[i], s[i], s[i], 65535); + buffer[i] = QRgba64::fromRgba64(src[i], src[i], src[i], 65535); return buffer; } -- cgit v1.2.3