From c5a43acf18c8e15f28c2b4f6fd2402317f089b89 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Thu, 4 Dec 2014 17:25:54 +0100 Subject: XCB: Don't override non-existent method when QT_NO_OPENGL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/xcb/qxcbbackingstore.cpp | 2 ++ src/plugins/platforms/xcb/qxcbbackingstore.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp index 0b9717759b..5c200b4058 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp +++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp @@ -287,10 +287,12 @@ void QXcbBackingStore::beginPaint(const QRegion ®ion) } } +#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 ®ion, const QPoint &offset) { diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.h b/src/plugins/platforms/xcb/qxcbbackingstore.h index 342bbc856a..3a7e124b3f 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.h +++ b/src/plugins/platforms/xcb/qxcbbackingstore.h @@ -56,8 +56,8 @@ public: void composeAndFlush(QWindow *window, const QRegion ®ion, 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; -- cgit v1.2.3