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 <gabriel.dedietrich@digia.com>
bb10
Morten Johan Sørvig 2014-01-20 13:01:32 +01:00 committed by The Qt Project
parent c30fc6949a
commit c58c98a248
1 changed files with 6 additions and 0 deletions

View File

@ -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;