summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport/input')
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp9
-rw-r--r--src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h1
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp9
-rw-r--r--src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h1
-rw-r--r--src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp9
-rw-r--r--src/platformsupport/input/evdevtablet/qevdevtabletmanager_p.h1
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp9
-rw-r--r--src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h1
8 files changed, 16 insertions, 24 deletions
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp
index f272728aaf..52d9c34b1c 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp
@@ -72,16 +72,15 @@ QEvdevKeyboardManager::QEvdevKeyboardManager(const QString &key, const QString &
if (parsed.devices.isEmpty()) {
qCDebug(qLcEvdevKey, "evdevkeyboard: Using device discovery");
- m_deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Keyboard, this);
- if (m_deviceDiscovery) {
+ if (auto deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Keyboard, this)) {
// scan and add already connected keyboards
- const QStringList devices = m_deviceDiscovery->scanConnectedDevices();
+ const QStringList devices = deviceDiscovery->scanConnectedDevices();
for (const QString &device : devices)
addKeyboard(device);
- connect(m_deviceDiscovery, &QDeviceDiscovery::deviceDetected,
+ connect(deviceDiscovery, &QDeviceDiscovery::deviceDetected,
this, &QEvdevKeyboardManager::addKeyboard);
- connect(m_deviceDiscovery, &QDeviceDiscovery::deviceRemoved,
+ connect(deviceDiscovery, &QDeviceDiscovery::deviceRemoved,
this, &QEvdevKeyboardManager::removeKeyboard);
}
}
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h
index e495aafc9a..d91da330c3 100644
--- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h
+++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h
@@ -79,7 +79,6 @@ private:
QString m_spec;
QtInputSupport::DeviceHandlerList<QEvdevKeyboardHandler> m_keyboards;
- QDeviceDiscovery *m_deviceDiscovery;
QString m_defaultKeymapFile;
};
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp
index f64ba908e8..0c19294905 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp
+++ b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp
@@ -82,16 +82,15 @@ QEvdevMouseManager::QEvdevMouseManager(const QString &key, const QString &specif
if (parsed.devices.isEmpty()) {
qCDebug(qLcEvdevMouse, "evdevmouse: Using device discovery");
- m_deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Mouse | QDeviceDiscovery::Device_Touchpad, this);
- if (m_deviceDiscovery) {
+ if (auto deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Mouse | QDeviceDiscovery::Device_Touchpad, this)) {
// scan and add already connected keyboards
- const QStringList devices = m_deviceDiscovery->scanConnectedDevices();
+ const QStringList devices = deviceDiscovery->scanConnectedDevices();
for (const QString &device : devices)
addMouse(device);
- connect(m_deviceDiscovery, &QDeviceDiscovery::deviceDetected,
+ connect(deviceDiscovery, &QDeviceDiscovery::deviceDetected,
this, &QEvdevMouseManager::addMouse);
- connect(m_deviceDiscovery, &QDeviceDiscovery::deviceRemoved,
+ connect(deviceDiscovery, &QDeviceDiscovery::deviceRemoved,
this, &QEvdevMouseManager::removeMouse);
}
}
diff --git a/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h b/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h
index 1d547da1e8..f5c32ed8b5 100644
--- a/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h
+++ b/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h
@@ -83,7 +83,6 @@ private:
QString m_spec;
QtInputSupport::DeviceHandlerList<QEvdevMouseHandler> m_mice;
- QDeviceDiscovery *m_deviceDiscovery;
int m_x;
int m_y;
int m_xoffset;
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;
};
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp
index a945bd6168..b280f27fac 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp
@@ -76,15 +76,14 @@ QEvdevTouchManager::QEvdevTouchManager(const QString &key, const QString &specif
// when no devices specified, use device discovery to scan and monitor
if (parsed.devices.isEmpty()) {
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();
+ if (auto deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_Touchpad | QDeviceDiscovery::Device_Touchscreen, this)) {
+ const QStringList devices = deviceDiscovery->scanConnectedDevices();
for (const QString &device : devices)
addDevice(device);
- connect(m_deviceDiscovery, &QDeviceDiscovery::deviceDetected,
+ connect(deviceDiscovery, &QDeviceDiscovery::deviceDetected,
this, &QEvdevTouchManager::addDevice);
- connect(m_deviceDiscovery, &QDeviceDiscovery::deviceRemoved,
+ connect(deviceDiscovery, &QDeviceDiscovery::deviceRemoved,
this, &QEvdevTouchManager::removeDevice);
}
}
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h b/src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h
index 97f3137676..94ee05d900 100644
--- a/src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h
+++ b/src/platformsupport/input/evdevtouch/qevdevtouchmanager_p.h
@@ -75,7 +75,6 @@ public:
private:
QString m_spec;
- QDeviceDiscovery *m_deviceDiscovery;
QtInputSupport::DeviceHandlerList<QEvdevTouchScreenHandlerThread> m_activeDevices;
};