summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input/evdevtablet
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-06-12 23:58:36 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-06-13 08:48:26 +0200
commit779f1ff9fad916ce7beb7dfbf3a96b0207c01319 (patch)
treef02c588a79c6c1b20a9ff6ac8b7ea5824bf8009d /src/platformsupport/input/evdevtablet
parentf1404c0ed1f89df931210a843727a1fd4eaef6a8 (diff)
QEvdev: remove m_deviceDiscovery members
They were never referenced outside the classes' ctor and, worse, remained uninitialized if the specification string contained devices. Change-Id: I977a156acf10190428da00fe128fee70cff8f98d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
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;
};