Fix build with -no-feature-tabletevent
Pick-to: 6.2 6.3 5.15 Fixes: QTBUG-99965 Change-Id: Ib7fcf92973b4e559713ae27ad0c7f843f9122daf Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
3047afe05f
commit
290f345d84
@ -44,7 +44,6 @@ qt_internal_add_module(WaylandClient
|
||||
qwaylandshmwindow.cpp qwaylandshmwindow_p.h
|
||||
qwaylandsubsurface.cpp qwaylandsubsurface_p.h
|
||||
qwaylandsurface.cpp qwaylandsurface_p.h
|
||||
qwaylandtabletv2.cpp qwaylandtabletv2_p.h
|
||||
qwaylandtouch.cpp qwaylandtouch_p.h
|
||||
qwaylandwindow.cpp qwaylandwindow_p.h
|
||||
qwaylandwindowmanagerintegration.cpp qwaylandwindowmanagerintegration_p.h
|
||||
@ -107,6 +106,11 @@ qt6_generate_wayland_protocol_client_sources(WaylandClient
|
||||
# )
|
||||
# special case end
|
||||
|
||||
qt_internal_extend_target(WaylandClient CONDITION QT_FEATURE_tabletevent
|
||||
SOURCES
|
||||
qwaylandtabletv2.cpp qwaylandtabletv2_p.h
|
||||
)
|
||||
|
||||
qt_internal_extend_target(WaylandClient CONDITION QT_FEATURE_wayland_text_input_v4_wip
|
||||
SOURCES
|
||||
qwaylandtextinputv4.cpp qwaylandtextinputv4_p.h
|
||||
|
@ -75,7 +75,9 @@
|
||||
#include "qwaylandpointergestures_p.h"
|
||||
#include "qwaylandsubsurface_p.h"
|
||||
#include "qwaylandtouch_p.h"
|
||||
#if QT_CONFIG(tabletevent)
|
||||
#include "qwaylandtabletv2_p.h"
|
||||
#endif
|
||||
#include "qwaylandqtkey_p.h"
|
||||
|
||||
#include <QtWaylandClient/private/qwayland-text-input-unstable-v2.h>
|
||||
@ -524,8 +526,10 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
|
||||
mTouchExtension.reset(new QWaylandTouchExtension(this, id));
|
||||
} else if (interface == QLatin1String(QWaylandQtKeyExtension::interface()->name)) {
|
||||
mQtKeyExtension.reset(new QWaylandQtKeyExtension(this, id));
|
||||
#if QT_CONFIG(tabletevent)
|
||||
} else if (interface == QLatin1String(QWaylandTabletManagerV2::interface()->name)) {
|
||||
mTabletManager.reset(new QWaylandTabletManagerV2(this, id, qMin(1, int(version))));
|
||||
#endif
|
||||
} else if (interface == QLatin1String(QWaylandPointerGestures::interface()->name)) {
|
||||
mPointerGestures.reset(new QWaylandPointerGestures(this, id, 1));
|
||||
#if QT_CONFIG(wayland_client_primary_selection)
|
||||
|
@ -101,7 +101,9 @@ class QWaylandDataDeviceManager;
|
||||
#if QT_CONFIG(wayland_client_primary_selection)
|
||||
class QWaylandPrimarySelectionDeviceManagerV1;
|
||||
#endif
|
||||
#if QT_CONFIG(tabletevent)
|
||||
class QWaylandTabletManagerV2;
|
||||
#endif
|
||||
class QWaylandPointerGestures;
|
||||
class QWaylandTouchExtension;
|
||||
class QWaylandQtKeyExtension;
|
||||
@ -168,7 +170,9 @@ public:
|
||||
QWaylandPrimarySelectionDeviceManagerV1 *primarySelectionManager() const { return mPrimarySelectionManager.data(); }
|
||||
#endif
|
||||
QtWayland::qt_surface_extension *windowExtension() const { return mWindowExtension.data(); }
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QWaylandTabletManagerV2 *tabletManager() const { return mTabletManager.data(); }
|
||||
#endif
|
||||
QWaylandPointerGestures *pointerGestures() const { return mPointerGestures.data(); }
|
||||
QWaylandTouchExtension *touchExtension() const { return mTouchExtension.data(); }
|
||||
QtWayland::qt_text_input_method_manager_v1 *textInputMethodManager() const { return mTextInputMethodManager.data(); }
|
||||
@ -277,7 +281,9 @@ private:
|
||||
QScopedPointer<QWaylandTouchExtension> mTouchExtension;
|
||||
QScopedPointer<QWaylandQtKeyExtension> mQtKeyExtension;
|
||||
QScopedPointer<QWaylandWindowManagerIntegration> mWindowManagerIntegration;
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QScopedPointer<QWaylandTabletManagerV2> mTabletManager;
|
||||
#endif
|
||||
QScopedPointer<QWaylandPointerGestures> mPointerGestures;
|
||||
#if QT_CONFIG(wayland_client_primary_selection)
|
||||
QScopedPointer<QWaylandPrimarySelectionDeviceManagerV1> mPrimarySelectionManager;
|
||||
|
@ -50,7 +50,9 @@
|
||||
#if QT_CONFIG(wayland_client_primary_selection)
|
||||
#include "qwaylandprimaryselectionv1_p.h"
|
||||
#endif
|
||||
#if QT_CONFIG(tabletevent)
|
||||
#include "qwaylandtabletv2_p.h"
|
||||
#endif
|
||||
#include "qwaylandpointergestures_p.h"
|
||||
#include "qwaylandtouch_p.h"
|
||||
#include "qwaylandscreen_p.h"
|
||||
@ -435,8 +437,10 @@ QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, int version,
|
||||
if (mQDisplay->textInputMethodManager())
|
||||
mTextInputMethod.reset(new QWaylandTextInputMethod(mQDisplay, mQDisplay->textInputMethodManager()->get_text_input_method(wl_seat())));
|
||||
|
||||
#if QT_CONFIG(tabletevent)
|
||||
if (auto *tm = mQDisplay->tabletManager())
|
||||
mTabletSeat.reset(new QWaylandTabletSeatV2(tm, this));
|
||||
#endif
|
||||
}
|
||||
|
||||
// Can't be in header because dtors for scoped pointers aren't known there.
|
||||
|
@ -90,7 +90,9 @@ class QWaylandDisplay;
|
||||
#if QT_CONFIG(wayland_client_primary_selection)
|
||||
class QWaylandPrimarySelectionDeviceV1;
|
||||
#endif
|
||||
#if QT_CONFIG(tabletevent)
|
||||
class QWaylandTabletSeatV2;
|
||||
#endif
|
||||
class QWaylandPointerGestures;
|
||||
class QWaylandPointerGestureSwipe;
|
||||
class QWaylandPointerGesturePinch;
|
||||
@ -135,8 +137,10 @@ public:
|
||||
QWaylandPrimarySelectionDeviceV1 *primarySelectionDevice() const;
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(tabletevent)
|
||||
void setTabletSeat(QWaylandTabletSeatV2 *tabletSeat);
|
||||
QWaylandTabletSeatV2* tabletSeat() const;
|
||||
#endif
|
||||
|
||||
void setTextInput(QWaylandTextInputInterface *textInput);
|
||||
QWaylandTextInputInterface *textInput() const;
|
||||
@ -201,7 +205,9 @@ protected:
|
||||
|
||||
QScopedPointer<QWaylandTextInputInterface> mTextInput;
|
||||
QScopedPointer<QWaylandTextInputMethod> mTextInputMethod;
|
||||
#if QT_CONFIG(tabletevent)
|
||||
QScopedPointer<QWaylandTabletSeatV2> mTabletSeat;
|
||||
#endif
|
||||
|
||||
uint32_t mTime = 0;
|
||||
uint32_t mSerial = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user