diff options
Diffstat (limited to 'src/platformsupport/input')
9 files changed, 21 insertions, 28 deletions
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h index 3e5dcb2ac9..1065b05d51 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler_p.h @@ -46,8 +46,6 @@ #include <QTimer> #include <QDataStream> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE namespace QEvdevKeyboardMap { @@ -198,6 +196,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QEVDEVKEYBOARDHANDLER_P_H 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/evdevkeyboard/qevdevkeyboardmanager_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h index e750f72c3b..37c60c035c 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h @@ -50,8 +50,6 @@ #include <QHash> #include <QSocketNotifier> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QEvdevKeyboardManager : public QObject @@ -71,8 +69,6 @@ private: QDeviceDiscovery *m_deviceDiscovery; }; -QT_END_HEADER - QT_END_NAMESPACE #endif // QEVDEVKEYBOARDMANAGER_P_H diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h b/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h index 6e078b2d70..d419a1913e 100644 --- a/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h +++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler_p.h @@ -45,8 +45,6 @@ #include <QObject> #include <QString> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QSocketNotifier; @@ -83,6 +81,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QEVDEVMOUSEHANDLER_P_H 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/evdevmouse/qevdevmousemanager_p.h b/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h index a2c83c4a1c..6abe933371 100644 --- a/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h +++ b/src/platformsupport/input/evdevmouse/qevdevmousemanager_p.h @@ -50,8 +50,6 @@ #include <QHash> #include <QSocketNotifier> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QEvdevMouseManager : public QObject @@ -79,8 +77,6 @@ private: int m_yoffset; }; -QT_END_HEADER - QT_END_NAMESPACE #endif // QEVDEVMOUSEMANAGER_P_H diff --git a/src/platformsupport/input/evdevtablet/qevdevtablet_p.h b/src/platformsupport/input/evdevtablet/qevdevtablet_p.h index ce49a01e7b..9222db9907 100644 --- a/src/platformsupport/input/evdevtablet/qevdevtablet_p.h +++ b/src/platformsupport/input/evdevtablet/qevdevtablet_p.h @@ -46,8 +46,6 @@ #include <QString> #include <QThread> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QEvdevTabletData; @@ -82,6 +80,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QEVDEVTABLET_P_H 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..be7dbfba14 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouch_p.h +++ b/src/platformsupport/input/evdevtouch/qevdevtouch_p.h @@ -48,8 +48,6 @@ #include <QThread> #include <qpa/qwindowsysteminterface.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE class QSocketNotifier; @@ -63,7 +61,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: @@ -93,6 +91,4 @@ private: QT_END_NAMESPACE -QT_END_HEADER - #endif // QEVDEVTOUCH_P_H |