Added configuration environment variables for evdev input plugins.
Added new environment parameters QT_QPA_EVDEV_KEYBOARD_PARAMETERS, QT_QPA_EVDEV_MOUSE_PARAMETERS and QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS to the evdevkeyboard, evdevmouse and evdevtouch input plugins. In order to get evdevkeyboard support for keyboard layout, explicit device file and more. Change-Id: I0d9139cd0d4b682ab2df7c16ebd16d4d9c0c0ab0 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
d1f2309166
commit
27b4fe96b5
@ -57,7 +57,13 @@ QEvdevKeyboardManager::QEvdevKeyboardManager(const QString &key, const QString &
|
||||
{
|
||||
Q_UNUSED(key);
|
||||
|
||||
QStringList args = specification.split(QLatin1Char(':'));
|
||||
|
||||
QString spec = QString::fromLocal8Bit(qgetenv("QT_QPA_EVDEV_KEYBOARD_PARAMETERS"));
|
||||
|
||||
if (spec.isEmpty())
|
||||
spec = specification;
|
||||
|
||||
QStringList args = spec.split(QLatin1Char(':'));
|
||||
QStringList devices;
|
||||
|
||||
foreach (const QString &arg, args) {
|
||||
|
@ -59,7 +59,12 @@ QEvdevMouseManager::QEvdevMouseManager(const QString &key, const QString &specif
|
||||
{
|
||||
Q_UNUSED(key);
|
||||
|
||||
QStringList args = specification.split(QLatin1Char(':'));
|
||||
QString spec = QString::fromLocal8Bit(qgetenv("QT_QPA_EVDEV_MOUSE_PARAMETERS"));
|
||||
|
||||
if (spec.isEmpty())
|
||||
spec = specification;
|
||||
|
||||
QStringList args = spec.split(QLatin1Char(':'));
|
||||
QStringList devices;
|
||||
|
||||
foreach (const QString &arg, args) {
|
||||
|
@ -159,7 +159,7 @@ static inline bool testBit(long bit, const long *array)
|
||||
return (array[bit / LONG_BITS] >> bit % LONG_BITS) & 1;
|
||||
}
|
||||
|
||||
QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &spec, QObject *parent)
|
||||
QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, QObject *parent)
|
||||
: QObject(parent), m_notify(0), m_fd(-1), d(0)
|
||||
#ifdef USE_MTDEV
|
||||
, m_mtdev(0)
|
||||
@ -170,7 +170,13 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &spec, QObject
|
||||
QString dev;
|
||||
|
||||
// only the first device argument is used for now
|
||||
QString spec = QString::fromLocal8Bit(qgetenv("QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS"));
|
||||
|
||||
if (spec.isEmpty())
|
||||
spec = specification;
|
||||
|
||||
QStringList args = spec.split(QLatin1Char(':'));
|
||||
|
||||
for (int i = 0; i < args.count(); ++i) {
|
||||
if (args.at(i).startsWith(QLatin1String("/dev/"))) {
|
||||
dev = args.at(i);
|
||||
|
@ -63,7 +63,7 @@ class QEvdevTouchScreenHandler : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QEvdevTouchScreenHandler(const QString &spec = QString(), QObject *parent = 0);
|
||||
explicit QEvdevTouchScreenHandler(const QString &specification = QString(), QObject *parent = 0);
|
||||
~QEvdevTouchScreenHandler();
|
||||
|
||||
private slots:
|
||||
|
Loading…
Reference in New Issue
Block a user