summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-01-17 17:26:07 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-18 03:37:24 +0000
commit77895514d5419b77535de093b544aee30686cd22 (patch)
tree6cdf8243b4c46fb6bae263f8b63fdb1435f60add /src/plugins/platforms
parent25a7c07e6c34ce5368a560c559b52a1201e0cef4 (diff)
Offscreen: Implement QPlatformBackingStore::toImage
This makes testing of actually produced output easy in unit tests. Task-number: QTBUG-99962 Change-Id: Ia806539230af12d1eae1e31ef7a47155d9bc1bed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit f718c35055dc52120ff8e034d47c678ba80ef3af) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/offscreen/qoffscreencommon.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/offscreen/qoffscreencommon.h b/src/plugins/platforms/offscreen/qoffscreencommon.h
index d0edfcc48b..6ed6f43816 100644
--- a/src/plugins/platforms/offscreen/qoffscreencommon.h
+++ b/src/plugins/platforms/offscreen/qoffscreencommon.h
@@ -106,6 +106,7 @@ public:
bool scroll(const QRegion &area, int dx, int dy) override;
QPixmap grabWindow(WId window, const QRect &rect) const;
+ QImage toImage() const override { return m_image; }
static QOffscreenBackingStore *backingStoreForWinId(WId id);