summaryrefslogtreecommitdiffstats
path: root/src/plugins/generic/evdevtouch/qevdevtouch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/generic/evdevtouch/qevdevtouch.cpp')
-rw-r--r--src/plugins/generic/evdevtouch/qevdevtouch.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/plugins/generic/evdevtouch/qevdevtouch.cpp b/src/plugins/generic/evdevtouch/qevdevtouch.cpp
index 37db20a419..c372b0d1ff 100644
--- a/src/plugins/generic/evdevtouch/qevdevtouch.cpp
+++ b/src/plugins/generic/evdevtouch/qevdevtouch.cpp
@@ -46,9 +46,7 @@
#include <QGuiApplication>
#include <QDebug>
#include <QtCore/private/qcore_unix_p.h>
-#ifndef QT_NO_LIBUDEV
-#include <QtPlatformSupport/private/qudevicehelper_p.h>
-#endif // QT_NO_LIBUDEV
+#include <QtPlatformSupport/private/qdevicediscovery_p.h>
#include <linux/input.h>
#ifdef USE_MTDEV
@@ -159,22 +157,20 @@ QTouchScreenHandler::QTouchScreenHandler(const QString &spec)
}
}
-#ifndef QT_NO_LIBUDEV
if (dev.isEmpty()) {
// try to let udev scan for already connected devices
- QScopedPointer<QUDeviceHelper> udeviceHelper(QUDeviceHelper::createUDeviceHelper(QUDeviceHelper::UDev_Touchpad | QUDeviceHelper::UDev_Touchscreen, this));
- if (udeviceHelper) {
- QStringList devices = udeviceHelper->scanConnectedDevices();
+ QScopedPointer<QDeviceDiscovery> deviceDiscovery(QDeviceDiscovery::create(QDeviceDiscovery::Device_Touchpad | QDeviceDiscovery::Device_Touchscreen, this));
+ if (deviceDiscovery) {
+ QStringList devices = deviceDiscovery->scanConnectedDevices();
// only the first device found is used for now
if (devices.size() > 0)
dev = devices[0];
}
}
-#endif // QT_NO_LIBUDEV
if (dev.isEmpty())
- dev = QLatin1String("/dev/input/event0");
+ return;
qDebug("evdevtouch: Using device %s", qPrintable(dev));
m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0);