Cocoa: Remove tablet event warnings.

Qt warns on all touchpad evens when running in a VM.
This appears to be harmless. Remove the warning.

Also, qWarnings are ideally messages to the application
developer about incorrect use of Qt API. In this case
there is nothing the application developer can do
and a qWarning is not really appropriate.

Task-number: QTBUG-36484

Change-Id: I8a50f5a15010f1f064509b83ef4f239b008e0f2b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Morten Johan Sørvig 2014-02-04 13:24:07 +01:00 committed by The Qt Project
parent eeb1fcd55c
commit 98405c41c2

View File

@ -859,14 +859,9 @@ 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.");
// Error: Unknown tablet device. Qt also gets into this state
// when running on a VM. This appears to be harmless; don't
// print a warning.
return;
}
const QCocoaTabletDeviceData &deviceData = tabletDeviceDataHash->value(deviceId);