From b84f4a350d3c67bd36de92a7cd7120ece9621896 Mon Sep 17 00:00:00 2001 From: Janne Juntunen Date: Thu, 30 Dec 2021 15:52:30 +0200 Subject: [PATCH] tst_QImageWriter: skip writing unsupported image formats Do not try to test writing of image formats which are not supported on the platform under testing. This test was failing for .ico files on webOS. Fixes: QTQAINFRA-4722 Pick-to: 6.3 Change-Id: Ic7d40d9751e0f921d9721c01492cca28d798e141 Reviewed-by: Eirik Aavitsland --- tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp index 6ce8060306..2f3c744fd9 100644 --- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp @@ -281,6 +281,8 @@ void tst_QImageWriter::writeImage2() QFETCH(QByteArray, format); QFETCH(QImage, image); + SKIP_IF_UNSUPPORTED(format); + //we reduce the scope of writer so that it closes the associated file // and QFile::remove can actually work {