diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-28 13:45:41 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-29 09:57:52 +0200 |
commit | 5400af8850a7a73a19443839fbd0c8f3d45b091b (patch) | |
tree | 43a64d72ca7b50d0b0a8b2ee9e34313b3e9305fa | |
parent | f5a28afe4c2cb82540c94616e7a9e3e72e0e8327 (diff) | |
download | qtwayland-5400af8850a7a73a19443839fbd0c8f3d45b091b.tar.gz |
Make QT_WAYLAND_COMPOSITOR_QUICK a feature
The define was only set when building Qt, not when including public
headers in application code. Therefore, the sizes of objects did not
match between the client code that calls new and the constructor inside
Qt.
Unfortunately, adding the additional members breaks binary
compatibility. This has already happened between 5.11 and 5.12. It just
wasn't apparent from the headers. If we removed the members again now,
we would break binary compatibility again. Therefore, the best course of
action seems to be acknowledging the break and adding the members also
in the headers.
[ChangeLog][Compositor][Important Behavior Changes] Between
version 5.11 and 5.12 binary compatibility for the wayland compositor
module was broken by adding an additional member to various classes.
This was not apparent from user code as the member was behind an #ifdef
which would only be set while compiling Qt. As several versions of Qt
incompatible to 5.11 have already been released now, rolling back the
incompatible change would introduce further incompatibility. Therefore,
the change is made consistent by unconditionally adding the member to
the headers.
Fixes: QTBUG-75677
Change-Id: I3c1ee309ad8e0cd0b6389a76fd1d91e6e2be495c
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r-- | src/compositor/compositor_api/compositor_api.pri | 4 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandquickchildren.h | 7 | ||||
-rw-r--r-- | src/compositor/configure.json | 6 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandivisurface.cpp | 4 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandivisurface.h | 2 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandshellsurface.cpp | 2 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandshellsurface.h | 2 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandwlshell.cpp | 4 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandwlshell.h | 2 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell.cpp | 4 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshell.h | 2 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellv5.cpp | 6 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellv5.h | 4 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellv6.cpp | 4 | ||||
-rw-r--r-- | src/compositor/extensions/qwaylandxdgshellv6.h | 2 | ||||
-rw-r--r-- | src/imports/compositor/compositor.pro | 2 |
16 files changed, 29 insertions, 28 deletions
diff --git a/src/compositor/compositor_api/compositor_api.pri b/src/compositor/compositor_api/compositor_api.pri index 8dbe12ac..c8f1c98b 100644 --- a/src/compositor/compositor_api/compositor_api.pri +++ b/src/compositor/compositor_api/compositor_api.pri @@ -64,9 +64,7 @@ qtConfig(draganddrop) { compositor_api/qwaylanddrag.cpp } -qtHaveModule(quick):qtConfig(opengl) { - DEFINES += QT_WAYLAND_COMPOSITOR_QUICK - +qtConfig(wayland-compositor-quick) { SOURCES += \ compositor_api/qwaylandquickcompositor.cpp \ compositor_api/qwaylandquicksurface.cpp \ diff --git a/src/compositor/compositor_api/qwaylandquickchildren.h b/src/compositor/compositor_api/qwaylandquickchildren.h index 7d821ab5..cee7a67e 100644 --- a/src/compositor/compositor_api/qwaylandquickchildren.h +++ b/src/compositor/compositor_api/qwaylandquickchildren.h @@ -51,16 +51,15 @@ // We mean it. // -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#include <QtWaylandCompositor/qtwaylandcompositorglobal.h> +#if QT_CONFIG(wayland_compositor_quick) #include <QtQml/QQmlListProperty> #include <QtCore/QVector> #endif -#include <QtCore/qglobal.h> - QT_BEGIN_NAMESPACE -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) #define Q_WAYLAND_COMPOSITOR_DECLARE_QUICK_CHILDREN(className) \ Q_PROPERTY(QQmlListProperty<QObject> data READ data DESIGNABLE false) \ Q_CLASSINFO("DefaultProperty", "data") \ diff --git a/src/compositor/configure.json b/src/compositor/configure.json index 0412d5e3..985f36dd 100644 --- a/src/compositor/configure.json +++ b/src/compositor/configure.json @@ -152,6 +152,12 @@ "label": "VSP2 hardware layer integration", "condition": "features.wayland-server && features.eglfs_vsp2 && libs.wayland-kms", "output": [ "privateFeature" ] + }, + "wayland-compositor-quick": { + "label": "QtQuick integration for wayland compositor", + "purpose": "Allows QtWayland compositor types to be used with QtQuick", + "condition": "features.wayland-server && module.quick && features.opengl", + "output": [ "publicFeature" ] } }, diff --git a/src/compositor/extensions/qwaylandivisurface.cpp b/src/compositor/extensions/qwaylandivisurface.cpp index b6398f06..7cf6464e 100644 --- a/src/compositor/extensions/qwaylandivisurface.cpp +++ b/src/compositor/extensions/qwaylandivisurface.cpp @@ -40,7 +40,7 @@ #include "qwaylandivisurface.h" #include "qwaylandivisurface_p.h" #include "qwaylandiviapplication_p.h" -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) #include "qwaylandivisurfaceintegration_p.h" #endif @@ -207,7 +207,7 @@ void QWaylandIviSurface::sendConfigure(const QSize &size) d->send_configure(size.width(), size.height()); } -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *QWaylandIviSurface::createIntegration(QWaylandQuickShellSurfaceItem *item) { return new QtWayland::IviSurfaceIntegration(item); diff --git a/src/compositor/extensions/qwaylandivisurface.h b/src/compositor/extensions/qwaylandivisurface.h index 65d5bbc8..525ad957 100644 --- a/src/compositor/extensions/qwaylandivisurface.h +++ b/src/compositor/extensions/qwaylandivisurface.h @@ -78,7 +78,7 @@ public: Q_INVOKABLE void sendConfigure(const QSize &size); -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override; #endif diff --git a/src/compositor/extensions/qwaylandshellsurface.cpp b/src/compositor/extensions/qwaylandshellsurface.cpp index 3cfe4489..f29e4e55 100644 --- a/src/compositor/extensions/qwaylandshellsurface.cpp +++ b/src/compositor/extensions/qwaylandshellsurface.cpp @@ -69,7 +69,7 @@ * \sa QWaylandSurface, QWaylandWlShellSurface, QWaylandXdgSurfaceV5, QWaylandIviSurface */ -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) /*! * \fn QWaylandQuickShellIntegration *QWaylandShellSurface::createIntegration(QWaylandQuickShellSurfaceItem *item) * diff --git a/src/compositor/extensions/qwaylandshellsurface.h b/src/compositor/extensions/qwaylandshellsurface.h index aca02e2f..6b943f36 100644 --- a/src/compositor/extensions/qwaylandshellsurface.h +++ b/src/compositor/extensions/qwaylandshellsurface.h @@ -54,7 +54,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandShellSurface : public QWaylandComposit Q_OBJECT Q_PROPERTY(Qt::WindowType windowType READ windowType NOTIFY windowTypeChanged) public: -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) virtual QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) = 0; #endif QWaylandShellSurface(QWaylandObject *waylandObject) : QWaylandCompositorExtension(waylandObject) {} diff --git a/src/compositor/extensions/qwaylandwlshell.cpp b/src/compositor/extensions/qwaylandwlshell.cpp index d932a06c..5e4ec6e6 100644 --- a/src/compositor/extensions/qwaylandwlshell.cpp +++ b/src/compositor/extensions/qwaylandwlshell.cpp @@ -41,7 +41,7 @@ #include "qwaylandwlshell.h" #include "qwaylandwlshell_p.h" -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) #include "qwaylandwlshellintegration_p.h" #endif @@ -584,7 +584,7 @@ void QWaylandWlShellSurface::sendPopupDone() d->send_popup_done(); } -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *QWaylandWlShellSurface::createIntegration(QWaylandQuickShellSurfaceItem *item) { return new QtWayland::WlShellIntegration(item); diff --git a/src/compositor/extensions/qwaylandwlshell.h b/src/compositor/extensions/qwaylandwlshell.h index 42188800..b37773e2 100644 --- a/src/compositor/extensions/qwaylandwlshell.h +++ b/src/compositor/extensions/qwaylandwlshell.h @@ -140,7 +140,7 @@ public: Q_INVOKABLE void sendConfigure(const QSize &size, ResizeEdge edges); Q_INVOKABLE void sendPopupDone(); -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override; #endif diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp index bd332287..69e35632 100644 --- a/src/compositor/extensions/qwaylandxdgshell.cpp +++ b/src/compositor/extensions/qwaylandxdgshell.cpp @@ -37,7 +37,7 @@ #include "qwaylandxdgshell.h" #include "qwaylandxdgshell_p.h" -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) #include "qwaylandxdgshellintegration_p.h" #endif @@ -680,7 +680,7 @@ QWaylandXdgSurface *QWaylandXdgSurface::fromResource(wl_resource *resource) return static_cast<QWaylandXdgSurfacePrivate *>(xsResource->xdg_surface_object)->q_func(); } -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *QWaylandXdgSurface::createIntegration(QWaylandQuickShellSurfaceItem *item) { Q_D(const QWaylandXdgSurface); diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h index 774dd228..c7834ab9 100644 --- a/src/compositor/extensions/qwaylandxdgshell.h +++ b/src/compositor/extensions/qwaylandxdgshell.h @@ -119,7 +119,7 @@ public: static QByteArray interfaceName(); static QWaylandXdgSurface *fromResource(::wl_resource *resource); -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override; #endif diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp index a6e88aab..51516e55 100644 --- a/src/compositor/extensions/qwaylandxdgshellv5.cpp +++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp @@ -40,7 +40,7 @@ #include "qwaylandxdgshellv5.h" #include "qwaylandxdgshellv5_p.h" -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) #include "qwaylandxdgshellv5integration_p.h" #endif @@ -1308,7 +1308,7 @@ uint QWaylandXdgSurfaceV5::sendResizing(const QSize &maxSize) return sendConfigure(maxSize, conf.states); } -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *QWaylandXdgSurfaceV5::createIntegration(QWaylandQuickShellSurfaceItem *item) { return new QtWayland::XdgShellV5Integration(item); @@ -1509,7 +1509,7 @@ void QWaylandXdgPopupV5::sendPopupDone() d->send_popup_done(); } -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *QWaylandXdgPopupV5::createIntegration(QWaylandQuickShellSurfaceItem *item) { return new QtWayland::XdgPopupV5Integration(item); diff --git a/src/compositor/extensions/qwaylandxdgshellv5.h b/src/compositor/extensions/qwaylandxdgshellv5.h index f989d04c..66e9ceb0 100644 --- a/src/compositor/extensions/qwaylandxdgshellv5.h +++ b/src/compositor/extensions/qwaylandxdgshellv5.h @@ -171,7 +171,7 @@ public: Q_INVOKABLE uint sendFullscreen(const QSize &size); Q_INVOKABLE uint sendResizing(const QSize &maxSize); -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override; #endif @@ -243,7 +243,7 @@ public: Q_INVOKABLE void sendPopupDone(); -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override; #endif diff --git a/src/compositor/extensions/qwaylandxdgshellv6.cpp b/src/compositor/extensions/qwaylandxdgshellv6.cpp index 8338fe6e..e4cb1dc2 100644 --- a/src/compositor/extensions/qwaylandxdgshellv6.cpp +++ b/src/compositor/extensions/qwaylandxdgshellv6.cpp @@ -37,7 +37,7 @@ #include "qwaylandxdgshellv6.h" #include "qwaylandxdgshellv6_p.h" -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) #include "qwaylandxdgshellv6integration_p.h" #endif @@ -685,7 +685,7 @@ QWaylandXdgSurfaceV6 *QWaylandXdgSurfaceV6::fromResource(wl_resource *resource) return static_cast<QWaylandXdgSurfaceV6Private *>(xsResource->zxdg_surface_v6_object)->q_func(); } -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *QWaylandXdgSurfaceV6::createIntegration(QWaylandQuickShellSurfaceItem *item) { Q_D(const QWaylandXdgSurfaceV6); diff --git a/src/compositor/extensions/qwaylandxdgshellv6.h b/src/compositor/extensions/qwaylandxdgshellv6.h index b9c47c57..710482ac 100644 --- a/src/compositor/extensions/qwaylandxdgshellv6.h +++ b/src/compositor/extensions/qwaylandxdgshellv6.h @@ -119,7 +119,7 @@ public: static QByteArray interfaceName(); static QWaylandXdgSurfaceV6 *fromResource(::wl_resource *resource); -#ifdef QT_WAYLAND_COMPOSITOR_QUICK +#if QT_CONFIG(wayland_compositor_quick) QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override; #endif diff --git a/src/imports/compositor/compositor.pro b/src/imports/compositor/compositor.pro index 50b26d4d..cc8a5306 100644 --- a/src/imports/compositor/compositor.pro +++ b/src/imports/compositor/compositor.pro @@ -14,8 +14,6 @@ COMPOSITOR_QML_FILES += \ WaylandOutputWindow.qml \ WaylandCursorItem.qml -DEFINES += QT_WAYLAND_COMPOSITOR_QUICK - # Create the resource file GENERATED_RESOURCE_FILE = $$OUT_PWD/compositor.qrc |