diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-03-21 12:21:23 (GMT) |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-03-21 12:26:27 (GMT) |
commit | 599a8f5b86bdf389e0edd2f42f0bd4ea050e24f1 (patch) | |
tree | 78d7891126348a16f66aee76f4b1f0f799df5d7e /tests/auto | |
parent | 8621d989b80bd384826569e6f6fec25fe3327c94 (diff) | |
download | Qt-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/auto')
-rw-r--r-- | tests/auto/qpixmap/tst_qpixmap.cpp | 9 |
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 |