From f568e43e107ba909eaad300729ee93354b0a1846 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Fri, 3 Jan 2014 14:38:12 +0900 Subject: [PATCH] Make qtbase compile with QT_NO_GESTURES Change-Id: I90f173265e177ff37ce80da3983080651856259d Reviewed-by: Oswald Buddenhagen --- src/gui/kernel/qguiapplication.cpp | 2 ++ src/gui/kernel/qguiapplication_p.h | 3 +++ src/gui/kernel/qwindowsysteminterface_p.h | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 1db252ca61..0711a37edd 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1473,10 +1473,12 @@ void QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePriv QGuiApplicationPrivate::processTabletLeaveProximityEvent( static_cast(e)); break; +#ifndef QT_NO_GESTURES case QWindowSystemInterfacePrivate::Gesture: QGuiApplicationPrivate::processGestureEvent( static_cast(e)); break; +#endif case QWindowSystemInterfacePrivate::PlatformPanel: QGuiApplicationPrivate::processPlatformPanelEvent( static_cast(e)); diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 65c6d814e6..218036033e 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -148,7 +148,10 @@ public: static void processTabletEvent(QWindowSystemInterfacePrivate::TabletEvent *e); static void processTabletEnterProximityEvent(QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e); static void processTabletLeaveProximityEvent(QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e); + +#ifndef QT_NO_GESTURES static void processGestureEvent(QWindowSystemInterfacePrivate::GestureEvent *e); +#endif static void processPlatformPanelEvent(QWindowSystemInterfacePrivate::PlatformPanelEvent *e); #ifndef QT_NO_CONTEXTMENU diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index 8cafb8da5c..42dbe7509e 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -91,7 +91,9 @@ public: PlatformPanel = UserInputEvent | 0x17, ContextMenu = UserInputEvent | 0x18, EnterWhatsThisMode = UserInputEvent | 0x19, +#ifndef QT_NO_GESTURES Gesture = UserInputEvent | 0x1a, +#endif ApplicationStateChanged = 0x19, FlushEvents = 0x20, WindowScreenChanged = 0x21 @@ -400,6 +402,7 @@ public: }; #endif +#ifndef QT_NO_GESTURES class GestureEvent : public InputEvent { public: GestureEvent(QWindow *window, ulong time, Qt::NativeGestureType type, QPointF pos, QPointF globalPos) @@ -414,6 +417,7 @@ public: ulong sequenceId; quint64 intValue; }; +#endif class WindowSystemEventList { QList impl;