From f8c53e88ee45b7b545dfa2d98419a3f6066c7e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 12 Apr 2016 13:26:46 +0200 Subject: Fix high-DPI image and svg providers Commit 834f9c76 accidentally inverted a validity test by going from !isEmpty() to !isValid(). Change to isValid() which preserves the previous logic: a set sourceSize is automatically scaled by the target devicePixelRatio. Verified with: tests/manual/highdpi/imageprovider.qml tests/manual/highdpi/svg.qml Change-Id: Ie979d566418c365d4d7fc5e5c3e6a795a891db51 Reviewed-by: Robin Burchell --- src/quick/items/qquickimagebase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp index 47952d86bd..dcbb4b3ea6 100644 --- a/src/quick/items/qquickimagebase.cpp +++ b/src/quick/items/qquickimagebase.cpp @@ -219,7 +219,7 @@ void QQuickImageBase::load() // sourceSize is set. If sourceSize is not set then the provider default size // will be used, as usual. bool setDevicePixelRatio = false; - if (!d->sourcesize.isValid()) { + if (d->sourcesize.isValid()) { if (loadUrl.scheme() == QStringLiteral("image")) { setDevicePixelRatio = true; } else { -- cgit v1.2.3