diff options
4 files changed, 21 insertions, 4 deletions
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp index 81acc161fe..4932087c5f 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager.cpp @@ -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) { diff --git a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp index 415cffa4ae..6c430091c1 100644 --- a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp +++ b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp @@ -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) { diff --git a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp index 8c86eee469..2c93da147e 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp @@ -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); diff --git a/src/platformsupport/input/evdevtouch/qevdevtouch_p.h b/src/platformsupport/input/evdevtouch/qevdevtouch_p.h index b4de2ca088..7e838c9134 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouch_p.h +++ b/src/platformsupport/input/evdevtouch/qevdevtouch_p.h @@ -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: |