summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-05-30 23:04:21 +0200
committerStephan Binner <stephan.binner@basyskom.com>2017-06-28 16:15:14 +0000
commit7f62c5fedc4a677fd9d9b002c4dfb9fd52a8a1a3 (patch)
treec0a138148fa99dee1f8e6a3476d49c71a80788fe /src/plugins/platforms/android
parent5ede5706a8b8052280981aa1d9c42999a24b74b5 (diff)
Convert features.tabletevent to QT_CONFIG
Change-Id: Ibd7ed7f269a64afddadee70979b20f1c58398378 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/plugins/platforms/android')
-rw-r--r--src/plugins/platforms/android/androidjniinput.cpp14
1 files changed, 8 insertions, 6 deletions
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 <QtGui/qtguiglobal.h>
+
#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)