From c7f86707949b654a50bc8e6240e665d53ec2a056 Mon Sep 17 00:00:00 2001 From: Skye Deving <76892045+skyedeving@users.noreply.github.com> Date: Thu, 7 Jan 2021 04:03:51 -0600 Subject: [PATCH] Add test case for apng failed to detect from content --- test/test_apng.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/test_apng.cpp b/test/test_apng.cpp index 180465a..50965ad 100644 --- a/test/test_apng.cpp +++ b/test/test_apng.cpp @@ -37,10 +37,17 @@ TEST_CASE("Detect png animation", "[apng][noci]") { p.setFormat("png"); REQUIRE(!QPixmap::fromImage(p.read()).isNull()); - // Auto detect fails + // Auto detect fails on apng QImageReader d; - d.setAutoDetectImageFormat(true); + d.setDecideFormatFromContent(true); d.setFileName("snackoo.png"); REQUIRE(!d.supportsAnimation()); REQUIRE(!QPixmap::fromImage(d.read()).isNull()); + + // Decide format fom content fails on apng + QImageReader c; + c.setDecideFormatFromContent(true); + c.setFileName("snackoo.png"); + REQUIRE(!c.supportsAnimation()); + REQUIRE(!QPixmap::fromImage(c.read()).isNull()); }