XCB: Don't override non-existent method when QT_NO_OPENGL

QBackingStore only has a toImage() method if OpenGL is enabled. I
noticed this because compilation failed for me, thanks to
Q_DECL_OVERRIDE.

qxcbbackingstore.h:60:12: error: ‘QImage QXcbBackingStore::toImage() const’ marked override, but does not override
     QImage toImage() const Q_DECL_OVERRIDE;

Change-Id: I6b45ef41c53d819d81fe657f26adc1f630fec6bb
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
This commit is contained in:
Uli Schlachter 2014-12-04 17:25:54 +01:00 committed by Shawn Rutledge
parent 047848cb30
commit c5a43acf18
2 changed files with 3 additions and 1 deletions

View File

@ -287,10 +287,12 @@ void QXcbBackingStore::beginPaint(const QRegion &region)
}
}
#ifndef QT_NO_OPENGL
QImage QXcbBackingStore::toImage() const
{
return m_image && m_image->image() ? *m_image->image() : QImage();
}
#endif
void QXcbBackingStore::flush(QWindow *window, const QRegion &region, const QPoint &offset)
{

View File

@ -56,8 +56,8 @@ public:
void composeAndFlush(QWindow *window, const QRegion &region, const QPoint &offset,
QPlatformTextureList *textures, QOpenGLContext *context,
bool translucentBackground) Q_DECL_OVERRIDE;
#endif
QImage toImage() const Q_DECL_OVERRIDE;
#endif
void resize(const QSize &size, const QRegion &staticContents) Q_DECL_OVERRIDE;
bool scroll(const QRegion &area, int dx, int dy) Q_DECL_OVERRIDE;