summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input/evdevtablet
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/input/evdevtablet')
-rw-r--r--src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp9
-rw-r--r--src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h1
2 files changed, 4 insertions, 6 deletions
diff --git a/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp b/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp
index 74d6b19e99..d9888c5b97 100644
--- a/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp
+++ b/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp
@@ -76,15 +76,14 @@ QEvdevTabletManager::QEvdevTabletManager(const QString &key, const QString &spec
// when no devices specified, use device discovery to scan and monitor
if (parsed.devices.isEmpty()) {
qCDebug(qLcEvdevTablet, "evdevtablet: Using device discovery");
- m_deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Tablet, this);
- if (m_deviceDiscovery) {
- const QStringList devices = m_deviceDiscovery->scanConnectedDevices();
+ if (auto deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Tablet, this)) {
+ const QStringList devices = deviceDiscovery->scanConnectedDevices();
for (const QString &device : devices)
addDevice(device);
- connect(m_deviceDiscovery, &QDeviceDiscovery::deviceDetected,
+ connect(deviceDiscovery, &QDeviceDiscovery::deviceDetected,
this, &QEvdevTabletManager::addDevice);
- connect(m_deviceDiscovery, &QDeviceDiscovery::deviceRemoved,
+ connect(deviceDiscovery, &QDeviceDiscovery::deviceRemoved,
this, &QEvdevTabletManager::removeDevice);
}
}
diff --git a/src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h b/src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h
index 0274f9d3ed..bb18ffba04 100644
--- a/src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h
+++ b/src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h
@@ -75,7 +75,6 @@ private:
void updateDeviceCount();
QString m_spec;
- QDeviceDiscovery *m_deviceDiscovery;
QtInputSupport::DeviceHandlerList<QEvdevTabletHandlerThread> m_activeDevices;
};