diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2017-08-30 12:32:29 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2017-09-05 14:16:38 +0000 |
commit | 35ed524d9226cb705081737652d72d5cbb86e6c6 (patch) | |
tree | 10b3a9b313c0ddf4d2447d701765da5d3db0d22c /src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp | |
parent | 4250993c4280b80f472af77efa6cf77410b383c1 (diff) |
evdev*,libinput: use functor-based connections
This results in less boilerplate code, among other benefits that
come with functor-based connections. Simple expressions have been
converted to use lambda.
Change-Id: I6887980524027eada24beed95e6f9ba43f0fc8d5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp')
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp index ab71d08fb1..4cacbf03e5 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp @@ -88,8 +88,11 @@ QEvdevTouchManager::QEvdevTouchManager(const QString &key, const QString &specif const QStringList devices = m_deviceDiscovery->scanConnectedDevices(); for (const QString &device : devices) addDevice(device); - connect(m_deviceDiscovery, SIGNAL(deviceDetected(QString)), this, SLOT(addDevice(QString))); - connect(m_deviceDiscovery, SIGNAL(deviceRemoved(QString)), this, SLOT(removeDevice(QString))); + + connect(m_deviceDiscovery, &QDeviceDiscovery::deviceDetected, + this, &QEvdevTouchManager::addDevice); + connect(m_deviceDiscovery, &QDeviceDiscovery::deviceRemoved, + this, &QEvdevTouchManager::removeDevice); } } } |