From dbaa4de28e5cdfa1787af77d236586833786ee61 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 21 Aug 2017 11:23:14 +0200 Subject: Cocoa: Fix compile when using QT_NO_TABLETEVENT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I76f08d747009a5bf2c0e8004c3443e16e83b6a7d Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qnsview.h | 2 ++ src/plugins/platforms/cocoa/qnsview.mm | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'src/plugins/platforms/cocoa') diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h index a78151ebbe..c37c45ce80 100644 --- a/src/plugins/platforms/cocoa/qnsview.h +++ b/src/plugins/platforms/cocoa/qnsview.h @@ -133,9 +133,11 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper)); - (void)otherMouseUp:(NSEvent *)theEvent; - (void)handleFrameStrutMouseEvent:(NSEvent *)theEvent; +#ifndef QT_NO_TABLETEVENT - (bool)handleTabletEvent: (NSEvent *)theEvent; - (void)tabletPoint: (NSEvent *)theEvent; - (void)tabletProximity: (NSEvent *)theEvent; +#endif - (int) convertKeyCode : (QChar)keyCode; + (Qt::KeyboardModifiers) convertKeyModifiers : (ulong)modifierFlags; diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index e6d513bb89..a40bdfd314 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -644,10 +644,12 @@ static bool _q_dontOverrideCtrlLMB = false; if (!m_platformWindow) return; +#ifndef QT_NO_TABLETEVENT // Tablet events may come in via the mouse event handlers, // check if this is a valid tablet event first. if ([self handleTabletEvent: theEvent]) return; +#endif QPointF qtWindowPoint; QPointF qtScreenPoint; @@ -1041,6 +1043,7 @@ static bool _q_dontOverrideCtrlLMB = false; m_platformWindow->m_enterLeaveTargetWindow = 0; } +#ifndef QT_NO_TABLETEVENT struct QCocoaTabletDeviceData { QTabletEvent::TabletDevice device; @@ -1211,6 +1214,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent) QWindowSystemInterface::handleTabletLeaveProximityEvent(timestamp, deviceData.device, deviceData.pointerType, deviceData.uid); } } +#endif - (bool)shouldSendSingleTouch { -- cgit v1.2.3