summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2014-12-04 17:25:54 +0100
committerShawn Rutledge <shawn.rutledge@digia.com>2014-12-08 09:55:19 +0100
commitc5a43acf18c8e15f28c2b4f6fd2402317f089b89 (patch)
treefacc7fb6dd9a1ae69705ba9713a6fdc604b21394 /src/plugins/platforms/xcb
parent047848cb306f4bdc19c28279d09d7de921305ad6 (diff)
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>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.h2
2 files changed, 3 insertions, 1 deletions
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 &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)
{
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 &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;