diff options
author | Andy Nichols <andy.nichols@qt.io> | 2016-04-28 13:13:57 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2016-04-30 20:20:27 +0000 |
commit | 3650cbc323eb4fbd32668b97212118c4d0acddc0 (patch) | |
tree | 93d41633a2012dd88ad630fd30068049276c15ad /src/gui/painting/qplatformbackingstore.cpp | |
parent | b4d2ae0676f6d404fa693068642e3721f0b8d1a8 (diff) |
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 <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/gui/painting/qplatformbackingstore.cpp')
-rw-r--r-- | src/gui/painting/qplatformbackingstore.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 |