From 9064de5692c83139aa3730ac6f8684c9402ae5db Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Mon, 28 May 2012 16:38:35 +1000 Subject: Fix scaling of svgz images. Force scaling of svgz images to source size as is done for svg. This also removes a work around for QTBUG-9053 which has now been resolved. Task-number: QTBUG-9053 Change-Id: I3aa898f74960ceb2e515bdb3aa44aa5a1a7a64d2 Reviewed-by: Yann Bodson --- src/quick/util/qquickpixmapcache.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/quick/util') diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index 2ef95a5959..f9fc755932 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -321,11 +321,7 @@ static bool readImage(const QUrl& url, QIODevice *dev, QImage *image, QString *e { QImageReader imgio(dev); - bool force_scale = false; - if (url.path().endsWith(QLatin1String(".svg"),Qt::CaseInsensitive)) { - imgio.setFormat("svg"); // QSvgPlugin::capabilities bug QTBUG-9053 - force_scale = true; - } + const bool force_scale = imgio.format() == "svg" || imgio.format() == "svgz"; if (requestSize.width() > 0 || requestSize.height() > 0) { QSize s = imgio.size(); -- cgit v1.2.3