From 18eedea179ef4636f114b38832330cb424090f73 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Wed, 2 Nov 2016 14:24:52 +0100 Subject: Fix build when some features are disabled Make QtWaylandClient compile when Qt is configured with: -no-opengl -no-accessibility -D QT_NO_CLIPBOARD -D QT_NO_DRAGANDDROP -D QT_NO_SESSIONMANAGER Task-number: QTBUG-56192 Change-Id: Idc6aae6b36a35515109a27bed31a22e3e909ef27 Reviewed-by: Giulio Camuffo --- src/client/qwaylanddisplay.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/client/qwaylanddisplay.cpp') diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index f9a556f4d..534ae4941 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -112,7 +112,9 @@ QWaylandWindowManagerIntegration *QWaylandDisplay::windowManagerIntegration() co QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration) : mWaylandIntegration(waylandIntegration) +#ifndef QT_NO_DRAGANDDROP , mDndSelectionHandler(0) +#endif , mWindowExtension(0) , mSubCompositor(0) , mTouchExtension(0) @@ -150,7 +152,9 @@ QWaylandDisplay::~QWaylandDisplay(void) mWaylandIntegration->destroyScreen(screen); } mScreens.clear(); +#ifndef QT_NO_DRAGANDDROP delete mDndSelectionHandler.take(); +#endif wl_display_disconnect(mDisplay); } @@ -243,8 +247,10 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin } else if (interface == QStringLiteral("wl_seat")) { QWaylandInputDevice *inputDevice = mWaylandIntegration->createInputDevice(this, version, id); mInputDevices.append(inputDevice); +#ifndef QT_NO_DRAGANDDROP } else if (interface == QStringLiteral("wl_data_device_manager")) { mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id)); +#endif } else if (interface == QStringLiteral("qt_surface_extension")) { mWindowExtension.reset(new QtWayland::qt_surface_extension(registry, id, 1)); } else if (interface == QStringLiteral("wl_subcompositor")) { -- cgit v1.2.3