From 425af59f534ed8a0f4bc7a77a1f83e4d1e2e2bdc Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 10 Jun 2013 11:56:14 +0200 Subject: Disable long press on Android Remove the mapping from press-and-hold to right-mouse-button press. This logic was implemented in the android plugin, and there was no way to disable it for applications that needed to handle long presses in a different way. Add an environment variable to enable the mapping for those who really need it, but do not advertise it. (We want to add a proper API for this in 5.2) Task-number: QTBUG-31644 Change-Id: Ia5ae75d6147485b73c78b7c3fa88d11af5d84c06 Reviewed-by: BogDan Vatra --- src/plugins/platforms/android/src/androidjniinput.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/plugins/platforms/android/src/androidjniinput.cpp') diff --git a/src/plugins/platforms/android/src/androidjniinput.cpp b/src/plugins/platforms/android/src/androidjniinput.cpp index da6156a330..29ccfe0125 100644 --- a/src/plugins/platforms/android/src/androidjniinput.cpp +++ b/src/plugins/platforms/android/src/androidjniinput.cpp @@ -163,6 +163,10 @@ namespace QtAndroidInput static void longPress(JNIEnv */*env*/, jobject /*thiz*/, jint /*winId*/, jint x, jint y) { + //### TODO: add proper API for Qt 5.2 + static bool rightMouseFromLongPress = qgetenv("QT_NECESSITAS_COMPATIBILITY_LONG_PRESS").toInt(); + if (!rightMouseFromLongPress) + return; m_ignoreMouseEvents = true; QPoint globalPos(x,y); QWindow *tlw = topLevelWindowAt(globalPos); -- cgit v1.2.3