summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-06-22 11:26:22 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-06-25 06:20:32 +0200
commit66c9033f7d8297f5db438e303576e841b6c0ff80 (patch)
tree2a17631855bc113d2b0ccc21268337a2fe5484fc
parent95e84c0ea95d3d3b7556c5c12bb2a52f856675d5 (diff)
Fix compile warnings when passing short ints into printf formatting
Use %hd instead of %d. Change-Id: I0062a507140d70263770cd7fe923efe94822d00e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/plugins/platforms/cocoa/qnsview_tablet.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_tablet.mm b/src/plugins/platforms/cocoa/qnsview_tablet.mm
index 062e147daf..7777e9c16a 100644
--- a/src/plugins/platforms/cocoa/qnsview_tablet.mm
+++ b/src/plugins/platforms/cocoa/qnsview_tablet.mm
@@ -112,7 +112,7 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash)
Qt::KeyboardModifiers keyboardModifiers = [QNSView convertKeyModifiers:[theEvent modifierFlags]];
Qt::MouseButtons buttons = ignoreButtonMapping ? static_cast<Qt::MouseButtons>(static_cast<uint>([theEvent buttonMask])) : m_buttons;
- qCDebug(lcQpaTablet, "event on tablet %d with tool %d type %d unique ID %lld pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf",
+ qCDebug(lcQpaTablet, "event on tablet %d with tool %hd type %hd unique ID %lld pos %6.1f, %6.1f root pos %6.1f, %6.1f buttons 0x%x pressure %4.2lf tilt %d, %d rotation %6.2lf",
deviceId, deviceData.device, deviceData.pointerType, deviceData.uid,
windowPoint.x(), windowPoint.y(), screenPoint.x(), screenPoint.y(),
static_cast<uint>(buttons), pressure, xTilt, yTilt, rotation);
@@ -211,7 +211,7 @@ static QInputDevice::DeviceType wacomTabletDevice(NSEvent *theEvent)
tabletDeviceDataHash->remove(deviceId);
}
- qCDebug(lcQpaTablet, "proximity change on tablet %d: current tool %d type %d unique ID %lld",
+ qCDebug(lcQpaTablet, "proximity change on tablet %d: current tool %hd type %hd unique ID %lld",
deviceId, deviceData.device, deviceData.pointerType, deviceData.uid);
if (entering) {