summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-06-08 12:00:05 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-06-11 21:38:47 +0000
commit0ad5e1626832d80952ef02bfe0457cf61b2f698e (patch)
treebf7b3c8696cc153963451838e11c1d53541e9c4a /src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp
parentc6a3507de2f53e40a3aef5e55fb8167ac5425676 (diff)
QEvdev: use printf-style qCDebug()/qWarning()
Also use qUtf16Printable() and qErrnoWarning (removing explicit errno, where present). Saves 6.6KiB in text size on optimized Linux AMD64 GCC 9.1 build across all .so's that link to QtInputSupport.a. Change-Id: I1def2cfabd2eed65390099cd1d06f8061a9355be Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp')
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp
index 4cacbf03e5..f59d8d5e99 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp
@@ -82,7 +82,7 @@ QEvdevTouchManager::QEvdevTouchManager(const QString &key, const QString &specif
// when no devices specified, use device discovery to scan and monitor
if (devices.isEmpty()) {
- qCDebug(qLcEvdevTouch) << "evdevtouch: Using device discovery";
+ qCDebug(qLcEvdevTouch, "evdevtouch: Using device discovery");
m_deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Touchpad | QDeviceDiscovery::Device_Touchscreen, this);
if (m_deviceDiscovery) {
const QStringList devices = m_deviceDiscovery->scanConnectedDevices();
@@ -104,21 +104,21 @@ QEvdevTouchManager::~QEvdevTouchManager()
void QEvdevTouchManager::addDevice(const QString &deviceNode)
{
- qCDebug(qLcEvdevTouch) << "evdevtouch: Adding device at" << deviceNode;
+ qCDebug(qLcEvdevTouch, "evdevtouch: Adding device at %ls", qUtf16Printable(deviceNode));
QEvdevTouchScreenHandlerThread *handler;
handler = new QEvdevTouchScreenHandlerThread(deviceNode, m_spec);
if (handler) {
m_activeDevices.insert(deviceNode, handler);
connect(handler, &QEvdevTouchScreenHandlerThread::touchDeviceRegistered, this, &QEvdevTouchManager::updateInputDeviceCount);
} else {
- qWarning("evdevtouch: Failed to open touch device %s", qPrintable(deviceNode));
+ qWarning("evdevtouch: Failed to open touch device %ls", qUtf16Printable(deviceNode));
}
}
void QEvdevTouchManager::removeDevice(const QString &deviceNode)
{
if (m_activeDevices.contains(deviceNode)) {
- qCDebug(qLcEvdevTouch) << "evdevtouch: Removing device at" << deviceNode;
+ qCDebug(qLcEvdevTouch, "evdevtouch: Removing device at %ls", qUtf16Printable(deviceNode));
QEvdevTouchScreenHandlerThread *handler = m_activeDevices.value(deviceNode);
m_activeDevices.remove(deviceNode);
delete handler;
@@ -135,8 +135,8 @@ void QEvdevTouchManager::updateInputDeviceCount()
++registeredTouchDevices;
}
- qCDebug(qLcEvdevTouch) << "evdevtouch: Updating QInputDeviceManager device count:" << registeredTouchDevices << " touch devices,"
- << m_activeDevices.count() - registeredTouchDevices << "pending handler(s)" ;
+ qCDebug(qLcEvdevTouch, "evdevtouch: Updating QInputDeviceManager device count: %d touch devices, %d pending handler(s)",
+ registeredTouchDevices, m_activeDevices.count() - registeredTouchDevices);
QInputDeviceManagerPrivate::get(QGuiApplicationPrivate::inputDeviceManager())->setDeviceCount(
QInputDeviceManager::DeviceTypeTouch, registeredTouchDevices);