libinput: remove unused signals
I guess this signal pattern was copy-pasted from evdev input integration code, where we use similar signals in combination with QDeviceDiscovery. In libinput, device notifications are delivered via libinput APIs, so these signals are not necessary. In evdev we do some logging from slots that are connected to these signals. In libinput this is handled via libinput_log_set_handler. As we can see, we can simply drop this code. Change-Id: I50b519784e89b59ceeb3cf296780705fe98a8cbf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
35ed524d92
commit
90d5959dc4
@ -157,10 +157,6 @@ void QLibInputHandler::processEvent(libinput_event *ev)
|
||||
// This is not just for hotplugging, it is also called for each input
|
||||
// device libinput reads from on startup. Hence it is suitable for doing
|
||||
// touch device registration.
|
||||
const char *sysname = libinput_device_get_sysname(dev); // node name without path
|
||||
const char *name = libinput_device_get_name(dev);
|
||||
emit deviceAdded(QString::fromUtf8(sysname), QString::fromUtf8(name));
|
||||
|
||||
QInputDeviceManagerPrivate *inputManagerPriv = QInputDeviceManagerPrivate::get(
|
||||
QGuiApplicationPrivate::inputDeviceManager());
|
||||
if (libinput_device_has_capability(dev, LIBINPUT_DEVICE_CAP_TOUCH)) {
|
||||
@ -183,10 +179,6 @@ void QLibInputHandler::processEvent(libinput_event *ev)
|
||||
}
|
||||
case LIBINPUT_EVENT_DEVICE_REMOVED:
|
||||
{
|
||||
const char *sysname = libinput_device_get_sysname(dev);
|
||||
const char *name = libinput_device_get_name(dev);
|
||||
emit deviceRemoved(QString::fromUtf8(sysname), QString::fromUtf8(name));
|
||||
|
||||
QInputDeviceManagerPrivate *inputManagerPriv = QInputDeviceManagerPrivate::get(
|
||||
QGuiApplicationPrivate::inputDeviceManager());
|
||||
if (libinput_device_has_capability(dev, LIBINPUT_DEVICE_CAP_TOUCH)) {
|
||||
|
@ -68,18 +68,12 @@ class QLibInputTouch;
|
||||
|
||||
class QLibInputHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QLibInputHandler(const QString &key, const QString &spec);
|
||||
~QLibInputHandler();
|
||||
|
||||
void onReadyRead();
|
||||
|
||||
signals:
|
||||
void deviceAdded(const QString &sysname, const QString &name);
|
||||
void deviceRemoved(const QString &sysname, const QString &name);
|
||||
|
||||
private:
|
||||
void processEvent(libinput_event *ev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user