diff options
author | Eirik Aavitsland <eirik.aavitsland@theqtcompany.com> | 2015-11-18 16:58:45 +0100 |
---|---|---|
committer | aavit <eirik.aavitsland@theqtcompany.com> | 2015-11-20 09:18:00 +0000 |
commit | 84eae855ee57ab1c37c8a84ad7e7afcd40b919e6 (patch) | |
tree | 9bf8cd34f4701e0f3fd4ad19a48537a69d22586e /tests/auto/qicon_svg/tst_qicon_svg.cpp | |
parent | 0379fb9186a75394b5cf0a3f5866da3d08b05e18 (diff) | |
download | qtsvg-84eae855ee57ab1c37c8a84ad7e7afcd40b919e6.tar.gz |
Improve format detection in the image reader pluginv5.6.0-beta1
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 "<!--" should be an indicator as good
as any of an xml file.
Task-number: QTBUG-49496
Change-Id: Id3c17f6b02344fa6a20bc2a839e345e5cebc14c2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'tests/auto/qicon_svg/tst_qicon_svg.cpp')
-rw-r--r-- | tests/auto/qicon_svg/tst_qicon_svg.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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() |