From 2a36495cde3f60b3782c277490638e274216a869 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 9 Feb 2016 16:26:07 +0100 Subject: QQuickPixmapCache: Use readImage's (more useful) error message. readImage already assigns to errorString if something goes wrong, so there's no need to overwrite it with a less useful error message (which doesn't tell us what actually went wrong). Before: Invalid image data: test.qml After: Error decoding: test.qml: Unsupported image format Change-Id: I7df3d24497d001e18453034c6f9f63bb51bd0ecc Reviewed-by: J-P Nurmi Reviewed-by: Michael Brasser --- src/quick/util/qquickpixmapcache.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index ed6da8ac91..36374e628e 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -1185,8 +1185,6 @@ static QQuickPixmapData* createPixmapDataSync(QQuickPixmap *declarativePixmap, Q *ok = true; return new QQuickPixmapData(declarativePixmap, url, QQuickTextureFactory::textureFactoryForImage(image), readSize, requestSize, autoTransform, appliedTransform); } - errorString = QQuickPixmap::tr("Invalid image data: %1").arg(url.toString()); - } else { errorString = QQuickPixmap::tr("Cannot open: %1").arg(url.toString()); } -- cgit v1.2.3