From 08da29e0dc1b68deba26ed210a766163901b8b9e Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 13 Feb 2024 14:55:24 +0100 Subject: [PATCH] Fix build with gcc-14 Work-around SiC change made to qfloat16 when using native floats. Change-Id: I981505e6eff7277ad14512b56fad334be6e79016 Reviewed-by: Ville Voutilainen Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira (cherry picked from commit dcb2186c2a3199d39af09bb81376437b55b907ef) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit a1413a6ecd100cde04a4c72bc0cf90d7c706dd6c) (cherry picked from commit 535afba59b4d5cc09a047132c5c21a210df86e45) --- .../gui/painting/qcolortransform/tst_qcolortransform.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp b/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp index 06e8db3e71b..2019d8a8385 100644 --- a/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp +++ b/tests/auto/gui/painting/qcolortransform/tst_qcolortransform.cpp @@ -182,21 +182,21 @@ void tst_QColorTransform::mapRGBAFP16x4() else QVERIFY(result != testColor); - testColor = QRgbaFloat16{0.0f, 0.0f, 0.0f, 1.0f}; + testColor = QRgbaFloat16{qfloat16(0.0f), qfloat16(0.0f), qfloat16(0.0f), qfloat16(1.0f)}; result = transform.map(testColor); QCOMPARE(result, testColor); - testColor = QRgbaFloat16{1.0f, 1.0f, 1.0f, 1.0f}; + testColor = QRgbaFloat16{qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f)}; result = transform.map(testColor); QCOMPARE(result, testColor); - testColor = QRgbaFloat16{1.0f, 1.0f, 0.0f, 1.0f}; + testColor = QRgbaFloat16{qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f)}; result = transform.map(testColor); QCOMPARE(result.alpha(), 1.0f); if (sharesRed) QCOMPARE(result.red(), 1.0f); - testColor = QRgbaFloat16{0.0f, 1.0f, 1.0f, 1.0f}; + testColor = QRgbaFloat16{qfloat16(0.0f), qfloat16(1.0f), qfloat16(1.0f), qfloat16(1.0f)}; result = transform.map(testColor); // QRgbaFloat16 might overflow blue if we convert to a smaller gamut: QCOMPARE(result.blue16(), 65535);