From bea214e765effd13309f25073678c0a417538183 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Tue, 12 Feb 2019 15:56:35 +0100 Subject: [PATCH] Fix: QBrush autotest failure on Android and Wayland Since Qt 5.5, brush textures are stored as QImages. If the texture has been set as a QPixmap, the conversion to QImage may change its pixel format, depending on the native system format. That is acceptable. Fixes: QTBUG-69193 Task-number: QTBUG-91418 Change-Id: Ic4dbeaa552b1f2183774a011e38414855a9dc4b1 Reviewed-by: Eirik Aavitsland --- tests/auto/gui/painting/qbrush/tst_qbrush.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp index 490d127efc..ea380e3cc9 100644 --- a/tests/auto/gui/painting/qbrush/tst_qbrush.cpp +++ b/tests/auto/gui/painting/qbrush/tst_qbrush.cpp @@ -456,10 +456,9 @@ void tst_QBrush::textureBrushStream() QCOMPARE(loadedBrush1.style(), Qt::TexturePattern); QCOMPARE(loadedBrush2.style(), Qt::TexturePattern); -#ifdef Q_OS_ANDROID - QEXPECT_FAIL("", "QTBUG-69193", Continue); -#endif - QCOMPARE(loadedBrush1.texture(), pixmap_source); + // pixmaps may have been converted to system format + QCOMPARE(loadedBrush1.texture().toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied), + pixmap_source.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied)); QCOMPARE(loadedBrush2.textureImage(), image_source); }