summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmap
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-21 14:21:23 +0200
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-21 14:26:27 +0200
commit599a8f5b86bdf389e0edd2f42f0bd4ea050e24f1 (patch)
tree78d7891126348a16f66aee76f4b1f0f799df5d7e /tests/auto/qpixmap
parent8621d989b80bd384826569e6f6fec25fe3327c94 (diff)
Remove incorrect check in qpixmap autotest.
The test assumed that pixmaps do not have an alpha channel. This is not true on some platforms, e.g. Symbian with OpenVG, there pixmaps are often backed by some image data in ARGB32_Premultiplied format, which means that QPixmap::mask() will return a valid QBitmap. Task-number: QTBUG-18247 Reviewed-by: Jani Hautakangas
Diffstat (limited to 'tests/auto/qpixmap')
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 464cd3bb34..0b5c30be79 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -641,9 +641,12 @@ void tst_QPixmap::mask()
QVERIFY(!pm.isNull());
QVERIFY(!bm.isNull());
- // hw: todo: this will fail if the default pixmap format is
- // argb32_premultiplied. The mask will be all 1's
- QVERIFY(pm.mask().isNull());
+ if (!pm.hasAlphaChannel()) {
+ // This would fail if the default pixmap format is
+ // argb32_premultiplied. The mask will be all 1's.
+ // Therefore this is skipped when the alpha channel is present.
+ QVERIFY(pm.mask().isNull());
+ }
QImage img = bm.toImage();
QVERIFY(img.format() == QImage::Format_MonoLSB