Fix -no-opengl builds

Task-number: QTBUG-41677
Change-Id: I039ec581e960eb70eb04aed6e65add70c563ba77
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
This commit is contained in:
Laszlo Agocs 2014-10-14 10:48:10 +02:00
parent 77fd8f63c3
commit 351e3672d6
4 changed files with 8 additions and 0 deletions

View File

@ -175,12 +175,14 @@ QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWindow *window) cons
return new QWaylandShmWindow(window);
}
#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *QWaylandIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
if (mDisplay->clientBufferIntegration())
return mDisplay->clientBufferIntegration()->createPlatformOpenGLContext(context->format(), context->shareHandle());
return 0;
}
#endif // QT_NO_OPENGL
QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow *window) const
{

View File

@ -61,7 +61,9 @@ public:
bool hasCapability(QPlatformIntegration::Capability cap) const;
QPlatformWindow *createPlatformWindow(QWindow *window) const;
#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
#endif
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const;
QAbstractEventDispatcher *createEventDispatcher() const;

View File

@ -323,6 +323,7 @@ QWaylandWindow *QWaylandShmBackingStore::waylandWindow() const
return static_cast<QWaylandWindow *>(window()->handle());
}
#ifndef QT_NO_OPENGL
QImage QWaylandShmBackingStore::toImage() const
{
// Invoked from QPlatformBackingStore::composeAndFlush() that is called
@ -331,6 +332,7 @@ QImage QWaylandShmBackingStore::toImage() const
return *contentSurface();
}
#endif // QT_NO_OPENGL
void QWaylandShmBackingStore::done(void *data, wl_callback *callback, uint32_t time)
{

View File

@ -94,7 +94,9 @@ public:
QWaylandWindow *waylandWindow() const;
void iterateBuffer();
#ifndef QT_NO_OPENGL
QImage toImage() const Q_DECL_OVERRIDE;
#endif
private:
void updateDecorations();