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 <x>" Change-Id: I98a39b30b1bc030611d3cfe9dd5e95886faf48ff Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit a6059cebe85c4ba8dd43df8aae146799c8bb6cb0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e938a4a100
commit
745e7583d0
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user