From 1e7a6451f8d85061e6f12e76ea159adb5b1017d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 29 Oct 2024 12:19:25 +0100 Subject: [PATCH] qpa: Add logging when registering and unregistering QInputDevice Change-Id: If2e7d106a449f3dc8ecb148540e21e1b70ec180e Reviewed-by: Shawn Rutledge (cherry picked from commit ba4227ece04dd751e1a68f3bb5779d93ea830b73) Reviewed-by: Qt Cherry-pick Bot --- src/gui/kernel/qinputdevice.cpp | 2 ++ src/gui/kernel/qwindowsysteminterface.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qinputdevice.cpp b/src/gui/kernel/qinputdevice.cpp index f7b216dcf0a..e515d5410bb 100644 --- a/src/gui/kernel/qinputdevice.cpp +++ b/src/gui/kernel/qinputdevice.cpp @@ -348,6 +348,7 @@ void QInputDevicePrivate::registerDevice(const QInputDevice *dev) { QMutexLocker lock(&devicesMutex); deviceList()->append(dev); + qCDebug(lcQpaInputDevices) << "Registered" << dev; } /*! @@ -357,6 +358,7 @@ void QInputDevicePrivate::unregisterDevice(const QInputDevice *dev) { QMutexLocker lock(&devicesMutex); deviceList()->removeOne(dev); + qCDebug(lcQpaInputDevices) << "Unregistered" << dev; } bool QInputDevice::operator==(const QInputDevice &other) const diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 7154dac6884..3e88380ae56 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -576,7 +576,6 @@ bool QWindowSystemInterface::handleWheelEvent(QWindow *window, ulong timestamp, */ void QWindowSystemInterface::registerInputDevice(const QInputDevice *device) { - qCDebug(lcQpaInputDevices) << "register" << device; QInputDevicePrivate::registerDevice(device); }