From 84eae855ee57ab1c37c8a84ad7e7afcd40b919e6 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Wed, 18 Nov 2015 16:58:45 +0100 Subject: Improve format detection in the image reader plugin canRead() would reject a file starting with an xml comment. canRead() by design accepts anything that looks like the start of an xml file, and the comment token " + + + + + + diff --git a/tests/auto/qicon_svg/tst_qicon_svg.cpp b/tests/auto/qicon_svg/tst_qicon_svg.cpp index f5b97e0..893cf99 100644 --- a/tests/auto/qicon_svg/tst_qicon_svg.cpp +++ b/tests/auto/qicon_svg/tst_qicon_svg.cpp @@ -60,6 +60,7 @@ void tst_QIcon_Svg::initTestCase() QFAIL("Can't find images directory!"); if (!QImageReader::supportedImageFormats().contains("svg")) QFAIL("SVG support is not available"); + QCOMPARE(QImageReader::imageFormat(prefix + "triangle.svg"), QByteArray("svg")); } void tst_QIcon_Svg::svgActualSize() -- cgit v1.2.1