summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmap/tst_qpixmap.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-03-22 09:47:31 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-03-22 09:47:31 (GMT)
commit13d4be08d1d07434515855e7fde8c3ab589358c4 (patch)
treebf83b20fb4707e7279df39fd6e38bbee36ee22ca /tests/auto/qpixmap/tst_qpixmap.cpp
parent9e85af3454bd0a2d962523d52e688f9bc7259528 (diff)
parent011c6d0f7498bf390e8df1ae646cfb649d8e143f (diff)
downloadQt-13d4be08d1d07434515855e7fde8c3ab589358c4.zip
Qt-13d4be08d1d07434515855e7fde8c3ab589358c4.tar.gz
Qt-13d4be08d1d07434515855e7fde8c3ab589358c4.tar.bz2
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: examples/declarative/positioners/layoutdirection/layoutdirection.qml src/corelib/global/qglobal.h src/plugins/qpluginbase.pri src/qbase.pri src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def tests/auto/selftests/expected_cmptest.txt tests/auto/selftests/expected_crashes_3.txt tests/auto/selftests/expected_longstring.txt tests/auto/selftests/expected_maxwarnings.txt tests/auto/selftests/expected_skip.txt tools/assistant/tools/assistant/doc/assistant.qdocconf tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qdeclarative.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
Diffstat (limited to 'tests/auto/qpixmap/tst_qpixmap.cpp')
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 480893a..4d032e8 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -52,6 +52,7 @@
#include <qsplashscreen.h>
#include <private/qpixmapdata_p.h>
+#include <private/qdrawhelper_p.h>
#include <QSet>
@@ -656,9 +657,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
@@ -1280,7 +1284,10 @@ void tst_QPixmap::fromSymbianCFbsBitmap()
QCOMPARE(actualColor, color);
QImage shouldBe(pixmap.width(), pixmap.height(), image.format());
- shouldBe.fill(color.rgba());
+ if (image.format() == QImage::Format_RGB16)
+ shouldBe.fill(qrgb565(color.rgba()).rawValue());
+ else
+ shouldBe.fill(color.rgba());
QCOMPARE(image, shouldBe);
}
__UHEAP_MARKEND;