summaryrefslogtreecommitdiffstats
path: root/src/compositor/extensions
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-06-24 12:45:48 +0200
committerJohan Helsing <johan.helsing@qt.io>2016-07-20 08:24:21 +0000
commitb6dff11dc9781b677c02c8308a44e85f2d919fa0 (patch)
treec7e7c0f3d3a8eed8222ff763ae295c074acc5e53 /src/compositor/extensions
parentef3e687fe6b983fb0a5bf648f2d66f2eadd85b58 (diff)
Compile with -no-opengl
QtWayland has not compiled without OpenGL for a while. This patch fixes the compilation issues and removes the old config variable, "QT_WAYLAND_GL_CONFIG" and instead checks for the presence of "opengl" in "QT_CONFIG". A new define is also introduced, QT_WAYLAND_COMPOSITOR_QUICK, because it may eventually be possible to use create a QtQuick compositor without OpenGL. Task-number: QTBUG-54322 Change-Id: Ica7b3b320212d4ae1f8b1053725b73c83739c73c Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'src/compositor/extensions')
-rw-r--r--src/compositor/extensions/extensions.pri2
-rw-r--r--src/compositor/extensions/qwaylandshellsurface.h2
-rw-r--r--src/compositor/extensions/qwaylandwlshell.cpp4
-rw-r--r--src/compositor/extensions/qwaylandwlshell.h2
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.cpp7
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.h4
6 files changed, 20 insertions, 1 deletions
diff --git a/src/compositor/extensions/extensions.pri b/src/compositor/extensions/extensions.pri
index 7aa4a3705..bb0abe885 100644
--- a/src/compositor/extensions/extensions.pri
+++ b/src/compositor/extensions/extensions.pri
@@ -35,7 +35,7 @@ SOURCES += \
extensions/qwaylandqtwindowmanager.cpp \
extensions/qwaylandxdgshell.cpp \
-qtHaveModule(quick) {
+qtHaveModule(quick):contains(QT_CONFIG, opengl) {
HEADERS += \
extensions/qwaylandquickshellsurfaceitem.h \
extensions/qwaylandquickshellsurfaceitem_p.h \
diff --git a/src/compositor/extensions/qwaylandshellsurface.h b/src/compositor/extensions/qwaylandshellsurface.h
index 1e9fcb5ab..88c736d24 100644
--- a/src/compositor/extensions/qwaylandshellsurface.h
+++ b/src/compositor/extensions/qwaylandshellsurface.h
@@ -50,7 +50,9 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandShellSurface : public QWaylandComposit
{
Q_OBJECT
public:
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
virtual QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) = 0;
+#endif
QWaylandShellSurface(QWaylandObject *waylandObject) : QWaylandCompositorExtension(waylandObject) {}
protected:
diff --git a/src/compositor/extensions/qwaylandwlshell.cpp b/src/compositor/extensions/qwaylandwlshell.cpp
index d39876cbc..3e53af624 100644
--- a/src/compositor/extensions/qwaylandwlshell.cpp
+++ b/src/compositor/extensions/qwaylandwlshell.cpp
@@ -38,7 +38,9 @@
#include "qwaylandwlshell.h"
#include "qwaylandwlshell_p.h"
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
#include "qwaylandwlshellintegration_p.h"
+#endif
#include <QtWaylandCompositor/QWaylandCompositor>
#include <QtWaylandCompositor/QWaylandView>
@@ -527,10 +529,12 @@ void QWaylandWlShellSurface::sendPopupDone()
d->send_popup_done();
}
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
QWaylandQuickShellIntegration *QWaylandWlShellSurface::createIntegration(QWaylandQuickShellSurfaceItem *item)
{
return new QtWayland::WlShellIntegration(item);
}
+#endif
/*!
* \qmlproperty object QtWaylandCompositor::WlShellSurface::surface
diff --git a/src/compositor/extensions/qwaylandwlshell.h b/src/compositor/extensions/qwaylandwlshell.h
index 13dae2e36..38d87a8c7 100644
--- a/src/compositor/extensions/qwaylandwlshell.h
+++ b/src/compositor/extensions/qwaylandwlshell.h
@@ -136,7 +136,9 @@ public:
Q_INVOKABLE void sendConfigure(const QSize &size, ResizeEdge edges);
Q_INVOKABLE void sendPopupDone();
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) Q_DECL_OVERRIDE;
+#endif
public Q_SLOTS:
void ping();
diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp
index 92676e0ef..8299bd4ce 100644
--- a/src/compositor/extensions/qwaylandxdgshell.cpp
+++ b/src/compositor/extensions/qwaylandxdgshell.cpp
@@ -36,7 +36,10 @@
#include "qwaylandxdgshell.h"
#include "qwaylandxdgshell_p.h"
+
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
#include "qwaylandxdgshellintegration_p.h"
+#endif
#include <QtWaylandCompositor/QWaylandCompositor>
#include <QtWaylandCompositor/QWaylandSurface>
@@ -976,10 +979,12 @@ uint QWaylandXdgSurface::sendResizing(const QSize &maxSize)
return sendConfigure(maxSize, conf.states);
}
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
QWaylandQuickShellIntegration *QWaylandXdgSurface::createIntegration(QWaylandQuickShellSurfaceItem *item)
{
return new QtWayland::XdgShellIntegration(item);
}
+#endif
/*!
* \class QWaylandXdgPopup
@@ -1139,9 +1144,11 @@ void QWaylandXdgPopup::sendPopupDone()
d->send_popup_done();
}
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
QWaylandQuickShellIntegration *QWaylandXdgPopup::createIntegration(QWaylandQuickShellSurfaceItem *item)
{
return new QtWayland::XdgPopupIntegration(item);
}
+#endif
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h
index 35b55fa23..263633dcc 100644
--- a/src/compositor/extensions/qwaylandxdgshell.h
+++ b/src/compositor/extensions/qwaylandxdgshell.h
@@ -159,7 +159,9 @@ public:
Q_INVOKABLE uint sendFullscreen(const QSize &size);
Q_INVOKABLE uint sendResizing(const QSize &maxSize);
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) Q_DECL_OVERRIDE;
+#endif
Q_SIGNALS:
void surfaceChanged();
@@ -222,7 +224,9 @@ public:
Q_INVOKABLE void sendPopupDone();
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) Q_DECL_OVERRIDE;
+#endif
Q_SIGNALS:
void surfaceChanged();