summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-03-13 13:04:40 +0100
committerJohan Helsing <johan.helsing@qt.io>2018-03-19 08:23:54 +0000
commitefa6e989125b3a9cf54a408aae8a86ef4bddf778 (patch)
tree8960e3999024da8e5d73a9439c470be6781e35b2 /tests/auto/gui/image
parentd3121e3888ae43a7dc074f5d8acc26b1973a7726 (diff)
QPixmap don't assume QPlatformScreen::format is opaque
QRasterPlatformPixmap::systemOpaqueFormat returned QPlatformScreen::format without checking that the format was actually opaque. This caused several QPixmap tests to fail on Wayland because Wayland compositors don't communicate the native format of the screen, just a list of supported pixel formats, so we just return ARGB32_premultiplied in QWaylandScreen::format(). Rename the method systemOpaqueFormat to systemNativeFormat since that's how it's used most of the time. And do a conversion when we actually care whether the format is opaque or not. Task-number: QTBUG-51748 Change-Id: I47dc1c3f185fb802016ca361206d47d02e8d3cf1 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/auto/gui/image')
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index de6713596d..e3bda6c2df 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -527,16 +527,8 @@ void tst_QPixmap::fill_transparent()
QVERIFY(pixmap.hasAlphaChannel());
}
-static bool isPlatformWayland()
-{
- return QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive);
-}
-
void tst_QPixmap::mask()
{
- if (isPlatformWayland())
- QSKIP("Wayland: This fails. See QTBUG-66983.");
-
QPixmap pm(100, 100);
QBitmap bm(100, 100);
@@ -778,9 +770,6 @@ void tst_QPixmap::convertFromImageNoDetach()
void tst_QPixmap::convertFromImageNoDetach2()
{
- if (isPlatformWayland())
- QSKIP("Wayland: This fails. See QTBUG-66984.");
-
QPixmap randomPixmap(10, 10);
if (randomPixmap.handle()->classId() != QPlatformPixmap::RasterClass)
QSKIP("Test only valid for raster pixmaps");
@@ -1455,9 +1444,6 @@ void tst_QPixmap::fromImageReaderAnimatedGif()
void tst_QPixmap::task_246446()
{
- if (isPlatformWayland())
- QSKIP("Wayland: This fails. See QTBUG-66985.");
-
// This crashed without the bugfix in 246446
QPixmap pm(10, 10);
pm.fill(Qt::transparent); // force 32-bit depth