From 5923196bc3fbed67beb637fd36e1bdf2d6780e36 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Fri, 20 Dec 2013 15:14:42 +0000 Subject: mtdev: Change to use configure detection instead of requiring source hacking. This coincidentally fixes a case of accidental BIC in qevdevtouch_p.h, where not all users would necessarily define USE_MTDEV: having it centralized inside Qt makes this now, blessedly, impossible. Change-Id: I196a8f21742830705759aa917a823afdc94ba2b5 Done-with: Michael Brasser Reviewed-by: Laszlo Agocs --- src/platformsupport/input/evdevtouch/qevdevtouch.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/platformsupport/input/evdevtouch/qevdevtouch.cpp') diff --git a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp index 89215557c1..d9468ae1b8 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouch.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouch.cpp @@ -49,7 +49,7 @@ #include #include -#ifdef USE_MTDEV +#if !defined(QT_NO_MTDEV) extern "C" { #include } @@ -164,7 +164,7 @@ static inline bool testBit(long bit, const long *array) QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, QObject *parent) : QObject(parent), m_notify(0), m_fd(-1), d(0) -#ifdef USE_MTDEV +#if !defined(QT_NO_MTDEV) , m_mtdev(0) #endif { @@ -233,7 +233,7 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, return; } -#ifdef USE_MTDEV +#if !defined(QT_NO_MTDEV) m_mtdev = static_cast(calloc(1, sizeof(mtdev))); int mtdeverr = mtdev_open(m_mtdev, m_fd); if (mtdeverr) { @@ -245,7 +245,7 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, d = new QEvdevTouchScreenData(this, args); -#ifdef USE_MTDEV +#if !defined(QT_NO_MTDEV) const char *mtdevStr = "(mtdev)"; d->m_typeB = true; #else @@ -329,7 +329,7 @@ QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &specification, QEvdevTouchScreenHandler::~QEvdevTouchScreenHandler() { -#ifdef USE_MTDEV +#if !defined(QT_NO_MTDEV) if (m_mtdev) { mtdev_close(m_mtdev); free(m_mtdev); @@ -347,7 +347,7 @@ void QEvdevTouchScreenHandler::readData() ::input_event buffer[32]; int n = 0; for (; ;) { -#ifdef USE_MTDEV +#if !defined(QT_NO_MTDEV) int result = mtdev_get(m_mtdev, m_fd, buffer, sizeof(buffer) / sizeof(::input_event)); if (result > 0) result *= sizeof(::input_event); -- cgit v1.2.3