diff options
author | Albert Astals Cid <albert.astals@canonical.com> | 2017-01-09 15:22:22 +0100 |
---|---|---|
committer | Robin Burchell <robin.burchell@crimson.no> | 2017-01-27 18:11:30 +0000 |
commit | d0649a1b457f321cfafee1aaf443543fd11a7112 (patch) | |
tree | 08beaa9b918087163ce68da34e8547bc99985490 /src/quick/items/qquickitemgrabresult.cpp | |
parent | 68932f24c66e2589bc202f4b5b7c248b7d19e6be (diff) |
Make Item::grabToImage work in more cases, and improve test coverage
This fixes a regression caused by 9c50216c7bbbdb2bb51d4485286bf09e12fb5b62
when the Image specified fillMode: aspectRatioCrop/Fit.
[ChangeLog][QtQuick][Image] Item::grabToImage on an Image element will now work
regardless of the Image's sourceSize or cache properties.
Change-Id: I225854c48f0c35a3cb2ef0dd56bf51bd88c31779
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Diffstat (limited to 'src/quick/items/qquickitemgrabresult.cpp')
-rw-r--r-- | src/quick/items/qquickitemgrabresult.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickitemgrabresult.cpp b/src/quick/items/qquickitemgrabresult.cpp index 07c2cb607c..12bcd43076 100644 --- a/src/quick/items/qquickitemgrabresult.cpp +++ b/src/quick/items/qquickitemgrabresult.cpp @@ -75,7 +75,7 @@ public: void ensureImageInCache() const { if (url.isEmpty() && !image.isNull()) { - url.setScheme(QStringLiteral("ItemGrabber")); + url.setScheme(QQuickPixmap::itemGrabberScheme); url.setPath(QVariant::fromValue(item.data()).toString()); static uint counter = 0; url.setFragment(QString::number(++counter)); |