From 3650cbc323eb4fbd32668b97212118c4d0acddc0 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 28 Apr 2016 13:13:57 +0200 Subject: Enable QPlatformBackingStore::toImage() when QT_NO_OPENGL is defined There are cases where you would want to grab the contents of a QWidget with a QSurfaceType of Raster, and in the case of a -no-opengl build there is no way to get the contents of a QBackingStore. The toImage() function was unnecessarily lumped into the QT_NO_OPENGL ifdef, so this commit removes this truncation of the API. Change-Id: I2644e3dc85339eecd8bae8b91f23ef2f29a7eee4 Reviewed-by: Laszlo Agocs --- src/gui/painting/qplatformbackingstore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui/painting/qplatformbackingstore.cpp') diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index 61975ee045..7381f381fe 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -411,7 +411,7 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i context->swapBuffers(window); } - +#endif /*! Implemented in subclasses to return the content of the backingstore as a QImage. @@ -424,7 +424,7 @@ QImage QPlatformBackingStore::toImage() const { return QImage(); } - +#ifndef QT_NO_OPENGL /*! May be reimplemented in subclasses to return the content of the backingstore as an OpenGL texture. \a dirtyRegion is the part of the -- cgit v1.2.3