From a6059cebe85c4ba8dd43df8aae146799c8bb6cb0 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 13 Jun 2023 22:38:37 +0200 Subject: [PATCH] Show decimal device IDs in QInputDevice qDebug output The lack of 0x adornment made hex confusing. `xinput list` shows device IDs as decimal, and device IDs appear in decimal in some categorized qt.qpa.input.devices log messages, so let's be consistent here too. Also fixed one more that was inconsistent in that category: "scroll event from unregistered device " Change-Id: I98a39b30b1bc030611d3cfe9dd5e95886faf48ff Pick-to: 6.5 6.6 Reviewed-by: Shawn Rutledge --- src/gui/kernel/qinputdevice.cpp | 2 +- src/gui/kernel/qpointingdevice.cpp | 2 +- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qinputdevice.cpp b/src/gui/kernel/qinputdevice.cpp index f20351a562..f7b216dcf0 100644 --- a/src/gui/kernel/qinputdevice.cpp +++ b/src/gui/kernel/qinputdevice.cpp @@ -384,7 +384,7 @@ QDebug operator<<(QDebug debug, const QInputDevice *device) debug << "QInputDevice("; debug << '"' << device->name() << "\", type=" << device->type() - << Qt::hex << ", ID=" << device->systemId() << ", seat='" << device->seatName() << "'"; + << ", ID=" << device->systemId() << ", seat='" << device->seatName() << "'"; debug << ')'; return debug; } diff --git a/src/gui/kernel/qpointingdevice.cpp b/src/gui/kernel/qpointingdevice.cpp index 3857d454d8..c4c1e5fd5c 100644 --- a/src/gui/kernel/qpointingdevice.cpp +++ b/src/gui/kernel/qpointingdevice.cpp @@ -708,7 +708,7 @@ QDebug operator<<(QDebug debug, const QPointingDevice *device) if (device) { debug << '"' << device->name() << "\" "; QtDebugUtils::formatQEnum(debug, device->type()); - debug << " id=" << Qt::hex << device->systemId() << Qt::dec; + debug << " id=" << device->systemId(); if (!device->seatName().isEmpty()) debug << " seat=" << device->seatName(); if (device->pointerType() != QPointingDevice::PointerType::Generic) { diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index a6fe0304e9..897a429970 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -766,7 +766,7 @@ void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event) if (auto device = QPointingDevicePrivate::pointingDeviceById(sourceDeviceId)) xi2HandleScrollEvent(event, device); else - qCWarning(lcQpaXInputEvents) << "scroll event from unregistered device" << Qt::hex << sourceDeviceId; + qCWarning(lcQpaXInputEvents) << "scroll event from unregistered device" << sourceDeviceId; if (xiDeviceEvent) { switch (xiDeviceEvent->event_type) {