diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-15 15:59:13 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-11-23 08:42:05 +0000 |
commit | 2333c58fff009435503c3b7ef3d86569227056eb (patch) | |
tree | c98fd555af28f6324b24a3884bc8f40fa18bde24 /src/compositor/wayland_wrapper | |
parent | 1d5b44cbb1e834bc8db94d8ec1ac140b8ca9ed37 (diff) |
Use the feature system internally
Get rid of almost all DEFINES += ... in the pro files,
instead use the proper QT_CONFIG() macro to determine
whether a feature is available.
Change-Id: I867769be2085c6ba93b6815e223e2b89edcb245d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/compositor/wayland_wrapper')
4 files changed, 6 insertions, 9 deletions
diff --git a/src/compositor/wayland_wrapper/qwlclientbuffer.cpp b/src/compositor/wayland_wrapper/qwlclientbuffer.cpp index 589ab825b..d52950388 100644 --- a/src/compositor/wayland_wrapper/qwlclientbuffer.cpp +++ b/src/compositor/wayland_wrapper/qwlclientbuffer.cpp @@ -36,7 +36,7 @@ #include "qwlclientbuffer_p.h" -#ifdef QT_WAYLAND_COMPOSITOR_GL +#if QT_CONFIG(opengl) #include "hardware_integration/qwlclientbufferintegration_p.h" #include <qpa/qplatformopenglcontext.h> #include <QOpenGLTexture> @@ -150,7 +150,7 @@ QImage SharedMemoryBuffer::image() const return QImage(); } -#ifdef QT_WAYLAND_COMPOSITOR_GL +#if QT_CONFIG(opengl) QOpenGLTexture *SharedMemoryBuffer::toOpenGlTexture(int plane) { Q_UNUSED(plane); diff --git a/src/compositor/wayland_wrapper/qwlclientbuffer_p.h b/src/compositor/wayland_wrapper/qwlclientbuffer_p.h index 78e07ee98..dafb3c5e5 100644 --- a/src/compositor/wayland_wrapper/qwlclientbuffer_p.h +++ b/src/compositor/wayland_wrapper/qwlclientbuffer_p.h @@ -97,7 +97,7 @@ public: bool isSharedMemory() const { return wl_shm_buffer_get(m_buffer); } -#ifdef QT_WAYLAND_COMPOSITOR_GL +#if QT_CONFIG(opengl) virtual QOpenGLTexture *toOpenGlTexture(int plane = 0) = 0; #endif @@ -132,7 +132,7 @@ public: QWaylandSurface::Origin origin() const Q_DECL_OVERRIDE; QImage image() const; -#ifdef QT_WAYLAND_COMPOSITOR_GL +#if QT_CONFIG(opengl) QOpenGLTexture *toOpenGlTexture(int plane = 0) Q_DECL_OVERRIDE; private: diff --git a/src/compositor/wayland_wrapper/qwlregion_p.h b/src/compositor/wayland_wrapper/qwlregion_p.h index ca14c7a51..c63cdbc45 100644 --- a/src/compositor/wayland_wrapper/qwlregion_p.h +++ b/src/compositor/wayland_wrapper/qwlregion_p.h @@ -48,7 +48,7 @@ // We mean it. // -#include <QtWaylandCompositor/qwaylandexport.h> +#include <QtWaylandCompositor/qtwaylandcompositorglobal.h> #include <QRegion> diff --git a/src/compositor/wayland_wrapper/wayland_wrapper.pri b/src/compositor/wayland_wrapper/wayland_wrapper.pri index 388303405..48e55e513 100644 --- a/src/compositor/wayland_wrapper/wayland_wrapper.pri +++ b/src/compositor/wayland_wrapper/wayland_wrapper.pri @@ -24,8 +24,5 @@ SOURCES += \ INCLUDEPATH += wayland_wrapper -qtConfig(xkbcommon-evdev) { +qtConfig(xkbcommon-evdev): \ QMAKE_USE += xkbcommon_evdev -} else { - DEFINES += QT_NO_WAYLAND_XKB -} |