From c58c98a248e104e55a7210b80a9f221bb019cbc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 20 Jan 2014 13:01:32 +0100 Subject: [PATCH] Cocoa: Silence tablet event warning on 10.6 10.6 sends tablet events for trackpad interaction, but not proximity events. The reason for this is not known. The events are discard. Silence the warning to avoid flooding the console. Change-Id: I6c215e8c15fc5b4b80e68b00f172121fc4d251b7 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qnsview.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index ecb6c127aa..e75b835d58 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -830,6 +830,12 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash) uint deviceId = [theEvent deviceID]; if (!tabletDeviceDataHash->contains(deviceId)) { + // 10.6 sends tablet events for trackpad interaction, but + // not proximity events. Silence the warning to prevent + // flooding the console. + if (QSysInfo::QSysInfo::MacintoshVersion == QSysInfo::MV_10_6) + return; + qWarning("QNSView handleTabletEvent: This tablet device is unknown" " (received no proximity event for it). Discarding event."); return;