Added automatic input device discovery to kms plugin.

Similar to what the EGLFS plugin does, to avoid having to explicitly
specify which device to use for keyboard and mouse.

Change-Id: I00502be8c767487490f3fd36fb06d3eb56548ada
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
This commit is contained in:
Samuel Rødal 2013-03-09 17:01:40 +01:00 committed by The Qt Project
parent 785edaa09d
commit 3a0071e286

View File

@ -48,6 +48,12 @@
#include "qkmsnativeinterface.h"
#include "qkmsvthandler.h"
#if !defined(QT_NO_EVDEV)
#include <QtPlatformSupport/private/qevdevmousemanager_p.h>
#include <QtPlatformSupport/private/qevdevkeyboardmanager_p.h>
#include <QtPlatformSupport/private/qevdevtouch_p.h>
#endif
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
#include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h>
#include <QtGui/private/qguiapplication_p.h>
@ -75,6 +81,12 @@ QKmsIntegration::QKmsIntegration()
connect(m_deviceDiscovery, SIGNAL(deviceDetected(QString)), this, SLOT(addDevice(QString)));
connect(m_deviceDiscovery, SIGNAL(deviceRemoved(QString)), this, SLOT(removeDevice(QString)));
}
#if !defined(QT_NO_EVDEV)
new QEvdevKeyboardManager(QLatin1String("EvdevKeyboard"), QString() /* spec */, this);
new QEvdevMouseManager(QLatin1String("EvdevMouse"), QString() /* spec */, this);
new QEvdevTouchScreenHandlerThread(QString() /* spec */, this);
#endif
}
QKmsIntegration::~QKmsIntegration()