From 7f62c5fedc4a677fd9d9b002c4dfb9fd52a8a1a3 Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Tue, 30 May 2017 23:04:21 +0200 Subject: Convert features.tabletevent to QT_CONFIG Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen --- src/plugins/platforms/android/androidjniinput.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/plugins/platforms/android') diff --git a/src/plugins/platforms/android/androidjniinput.cpp b/src/plugins/platforms/android/androidjniinput.cpp index 32630003d1..ef95b80dd4 100644 --- a/src/plugins/platforms/android/androidjniinput.cpp +++ b/src/plugins/platforms/android/androidjniinput.cpp @@ -38,6 +38,8 @@ ** ****************************************************************************/ +#include + #include "androidjniinput.h" #include "androidjnimain.h" #include "qandroidplatformintegration.h" @@ -292,17 +294,17 @@ namespace QtAndroidInput static bool isTabletEventSupported(JNIEnv */*env*/, jobject /*thiz*/) { -#ifdef QT_NO_TABLETEVENT - return false; -#else +#if QT_CONFIG(tabletevent) return true; -#endif // QT_NO_TABLETEVENT +#else + return false; +#endif // QT_CONFIG(tabletevent) } static void tabletEvent(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint deviceId, jlong time, jint action, jint pointerType, jint buttonState, jfloat x, jfloat y, jfloat pressure) { -#ifndef QT_NO_TABLETEVENT +#if QT_CONFIG(tabletevent) QPointF globalPosF(x, y); QPoint globalPos((int)x, (int)y); QWindow *tlw = topLevelWindowAt(globalPos); @@ -344,7 +346,7 @@ namespace QtAndroidInput QWindowSystemInterface::handleTabletEvent(tlw, ulong(time), localPos, globalPosF, QTabletEvent::Stylus, pointerType, buttons, pressure, 0, 0, 0., 0., 0, deviceId, Qt::NoModifier); -#endif // QT_NO_TABLETEVENT +#endif // QT_CONFIG(tabletevent) } static int mapAndroidKey(int key) -- cgit v1.2.3