summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-21 12:21:23 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-21 12:26:27 (GMT)
commit599a8f5b86bdf389e0edd2f42f0bd4ea050e24f1 (patch)
tree78d7891126348a16f66aee76f4b1f0f799df5d7e /tests
parent8621d989b80bd384826569e6f6fec25fe3327c94 (diff)
downloadQt-599a8f5b86bdf389e0edd2f42f0bd4ea050e24f1.zip
Qt-599a8f5b86bdf389e0edd2f42f0bd4ea050e24f1.tar.gz
Qt-599a8f5b86bdf389e0edd2f42f0bd4ea050e24f1.tar.bz2
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')
-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 464cd3b..0b5c30b 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