From 55dda687fd56915016ff7097034179a566d20a60 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 9 Sep 2020 17:36:22 +0200 Subject: [PATCH] QOpenGLFramebufferObject: merge toImage overloads Address ### Qt 6 comment Change-Id: I60b1dba72dbf2490294c84e5d1a85ae7e7181fc3 Reviewed-by: Laszlo Agocs --- src/opengl/qopenglframebufferobject.cpp | 13 ------------- src/opengl/qopenglframebufferobject.h | 3 +-- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/opengl/qopenglframebufferobject.cpp b/src/opengl/qopenglframebufferobject.cpp index 588ddd6535..78b192b630 100644 --- a/src/opengl/qopenglframebufferobject.cpp +++ b/src/opengl/qopenglframebufferobject.cpp @@ -1458,19 +1458,6 @@ QImage QOpenGLFramebufferObject::toImage(bool flipped) const return toImage(flipped, 0); } -/*! - \fn QImage QOpenGLFramebufferObject::toImage() const - \overload - - Returns the contents of this framebuffer object as a QImage. This method flips - the image from OpenGL coordinates to raster coordinates. -*/ -// ### Qt 6: Remove this method and make it a default argument instead. -QImage QOpenGLFramebufferObject::toImage() const -{ - return toImage(true, 0); -} - /*! \overload Returns the contents of the color attachment of index \a diff --git a/src/opengl/qopenglframebufferobject.h b/src/opengl/qopenglframebufferobject.h index 9351f6f1a6..3153aac3f6 100644 --- a/src/opengl/qopenglframebufferobject.h +++ b/src/opengl/qopenglframebufferobject.h @@ -108,8 +108,7 @@ public: QSize size() const; QList sizes() const; - QImage toImage() const; - QImage toImage(bool flipped) const; + QImage toImage(bool flipped = true) const; QImage toImage(bool flipped, int colorAttachmentIndex) const; Attachment attachment() const;