From c80f262258b7846bf199887bcfdbb6dcfda6ad6f Mon Sep 17 00:00:00 2001 From: Piotr Mikolajczyk Date: Thu, 25 Feb 2021 15:36:29 +0100 Subject: Android: Add select and copy capability to read-only text widgets In case of a read-only text editing widget it was imposibble to copy text from it. In QtWidgets you could not even see the selection handless. Text selection in QtWidgets module was filtered depending on readOnly property of the widget. Additionally, in InputMethod the read-only state was translated into disabled. Patch also makes the edit menu to be aware of the read-only status of the control - the menu items are different for rw and ro controls. Task-number: QTBUG-91417 Change-Id: Ic7b27f78678eeaa87a38607af787f254db1383b8 Reviewed-by: Rami Potinkara Reviewed-by: Ville Voutilainen --- src/android/jar/src/org/qtproject/qt/android/QtActivityDelegate.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/android') diff --git a/src/android/jar/src/org/qtproject/qt/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt/android/QtActivityDelegate.java index e9efd06497..0a60587aa8 100644 --- a/src/android/jar/src/org/qtproject/qt/android/QtActivityDelegate.java +++ b/src/android/jar/src/org/qtproject/qt/android/QtActivityDelegate.java @@ -566,9 +566,7 @@ public class QtActivityDelegate break; } - if (QtNative.hasClipboardText()) - editButtons |= EditContextView.PASTE_BUTTON; - else + if (!QtNative.hasClipboardText()) editButtons &= ~EditContextView.PASTE_BUTTON; if ((mode & CursorHandleShowEdit) == CursorHandleShowEdit && editButtons != 0) { -- cgit v1.2.3