From 56ea738c6d5a0447e88a77512ae574a1dd652cab Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 7 Sep 2016 16:43:00 +0200 Subject: [PATCH] Warn if using QWaylandClientExtension without a Wayland plugin Change-Id: Ibbf6acab4af45a6b17089bd3809c33a199dc89f6 Reviewed-by: Paul Olav Tvete Reviewed-by: Pier Luigi Fiorini --- .../platforms/wayland/global/qwaylandclientextension.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/platforms/wayland/global/qwaylandclientextension.cpp b/src/plugins/platforms/wayland/global/qwaylandclientextension.cpp index 8992e132f03..8e46197f18d 100644 --- a/src/plugins/platforms/wayland/global/qwaylandclientextension.cpp +++ b/src/plugins/platforms/wayland/global/qwaylandclientextension.cpp @@ -39,7 +39,9 @@ #include #include #include +#include #include +#include QT_BEGIN_NAMESPACE @@ -54,6 +56,9 @@ QWaylandClientExtensionPrivate::QWaylandClientExtensionPrivate() waylandIntegration = static_cast(QGuiApplicationPrivate::platformIntegration()); if (!waylandIntegration) waylandIntegration = new QtWaylandClient::QWaylandIntegration(); + + if (!waylandIntegration->nativeInterface()->nativeResourceForIntegration("wl_display")) + qWarning() << "This application requires a Wayland platform plugin"; } void QWaylandClientExtensionPrivate::handleRegistryGlobal(void *data, ::wl_registry *registry, uint32_t id,