From 98405c41c2d824a981fd9afd9d53a74c4b9ac562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 4 Feb 2014 13:24:07 +0100 Subject: [PATCH] Cocoa: Remove tablet event warnings. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/cocoa/qnsview.mm | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index e246775406..fcca96a8a8 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -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);