Warning, /graphics/krita/3rdparty/ext_qt/0001-Disable-QAccessibility-by-not-traversing-nodes.patch is written in an unsupported language. File is not indexed.
0001 From 71941e29acdf87fdfd91354b03535a536d05f934 Mon Sep 17 00:00:00 2001 0002 From: Sharaf Zaman <shzam@sdf.org> 0003 Date: Wed, 22 Dec 2021 23:12:36 +0000 0004 Subject: [PATCH] Disable QAccessibility by not traversing nodes 0005 0006 The problem is more complex than anticipated. We get to this function 0007 from the Android UI thread and we're supposed to return the node. 0008 However accessing QWidgets from non qtMainLoopThread is dangerous. 0009 0010 A solution that comes to mind is to invokeMethod while blocking, but 0011 that results in deadlocks (because qtMainLoopThread also has to wait for 0012 Android Ui thread). 0013 0014 NOTE: Async solution has its own complications: 0015 1. We'd have to manage lifetime of jobject local refs 0016 2. The node behind the scene may be long gone. 0017 --- 0018 src/plugins/platforms/android/androidjniaccessibility.cpp | 3 +++ 0019 1 file changed, 3 insertions(+) 0020 0021 diff --git a/src/plugins/platforms/android/androidjniaccessibility.cpp b/src/plugins/platforms/android/androidjniaccessibility.cpp 0022 index 6f1178e041..0a6eabd138 100644 0023 --- a/src/plugins/platforms/android/androidjniaccessibility.cpp 0024 +++ b/src/plugins/platforms/android/androidjniaccessibility.cpp 0025 @@ -243,6 +243,8 @@ if (!clazz) { \ 0026 0027 static bool populateNode(JNIEnv *env, jobject /*thiz*/, jint objectId, jobject node) 0028 { 0029 + return false; 0030 +#if 0 0031 QAccessibleInterface *iface = interfaceFromId(objectId); 0032 if (!iface || !iface->isValid()) { 0033 __android_log_print(ANDROID_LOG_WARN, m_qtTag, "Accessibility: populateNode for Invalid ID"); 0034 @@ -293,6 +295,7 @@ if (!clazz) { \ 0035 env->CallVoidMethod(node, m_setContentDescriptionMethodID, jdesc); 0036 0037 return true; 0038 +#endif 0039 } 0040 0041 static JNINativeMethod methods[] = { 0042 -- 0043 2.34.1 0044