diff --git a/src/plugins/platforms/wayland/qwaylandscreen_p.h b/src/plugins/platforms/wayland/qwaylandscreen_p.h index 836dd0392d0..4499f0eef14 100644 --- a/src/plugins/platforms/wayland/qwaylandscreen_p.h +++ b/src/plugins/platforms/wayland/qwaylandscreen_p.h @@ -16,6 +16,7 @@ // #include +#include #include #include @@ -34,7 +35,10 @@ public: QWaylandXdgOutputManagerV1(QWaylandDisplay *display, uint id, uint version); }; -class Q_WAYLANDCLIENT_EXPORT QWaylandScreen : public QPlatformScreen, QtWayland::wl_output, QtWayland::zxdg_output_v1 +class Q_WAYLANDCLIENT_EXPORT QWaylandScreen : public QPlatformScreen, + QtWayland::wl_output, + QtWayland::zxdg_output_v1, + public QNativeInterface::Private::QWaylandScreen { public: QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id); @@ -70,7 +74,10 @@ public: #endif uint32_t outputId() const { return m_outputId; } - ::wl_output *output() { return QtWayland::wl_output::object(); } + ::wl_output *output() const override + { + return const_cast<::wl_output *>(QtWayland::wl_output::object()); + } static QWaylandScreen *waylandScreenFromWindow(QWindow *window); static QWaylandScreen *fromWlOutput(::wl_output *output);