diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2016-04-12 13:26:46 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2016-04-12 12:58:49 +0000 |
commit | f8c53e88ee45b7b545dfa2d98419a3f6066c7e5b (patch) | |
tree | 18139b8cafdd3280b7db65dcb1011ba3828a398d /src/quick/items/qquickimagebase.cpp | |
parent | 5b9f096addaaa81aefc437020f2fdcf5fdade051 (diff) |
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 <robin.burchell@viroteck.net>
Diffstat (limited to 'src/quick/items/qquickimagebase.cpp')
-rw-r--r-- | src/quick/items/qquickimagebase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |