diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-02-12 15:56:35 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2021-03-11 07:03:45 +0000 |
commit | bea214e765effd13309f25073678c0a417538183 (patch) | |
tree | 8e0875708e296e082b8534029377a515cf4dd1be /tests/auto/gui/painting | |
parent | 346d30144a3d110eb5b0b1dd1902c72fafa794e2 (diff) |
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 <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/auto/gui/painting')
-rw-r--r-- | tests/auto/gui/painting/qbrush/tst_qbrush.cpp | 7 |
1 files 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); } |