tslib: Derive default device value from TSLIB_TSDEVICE environment variable
Most devices that use tslib have the device path defined by the TSLIB_TSDEVICE env. variable. Change-Id: I89fc17cb2c7fba7741de2fd348aacd608cb21a2a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
1e44ff671e
commit
dbf3c559da
@ -64,7 +64,10 @@ QTsLibMouseHandler::QTsLibMouseHandler(const QString &key,
|
||||
qDebug() << "QTsLibMouseHandler" << key << specification;
|
||||
setObjectName(QLatin1String("TSLib Mouse Handler"));
|
||||
|
||||
QByteArray device = "/dev/input/event1";
|
||||
QByteArray device = qgetenv("TSLIB_TSDEVICE");
|
||||
if (device.isEmpty())
|
||||
device = QByteArrayLiteral("/dev/input/event1");
|
||||
|
||||
if (specification.startsWith("/dev/"))
|
||||
device = specification.toLocal8Bit();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user