summaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorPiotr Mikolajczyk <piotr.mikolajczyk@qt.io>2021-02-25 15:36:29 +0100
committerPiotr Mikolajczyk <piotr.mikolajczyk@qt.io>2021-03-30 10:35:59 +0200
commitc80f262258b7846bf199887bcfdbb6dcfda6ad6f (patch)
tree509ec5a3dde42db3af4fa29f6a1fe7f154f85e98 /src/android
parent9275edbc31a0ca83740df5b4450b7776c59012dc (diff)
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 <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/jar/src/org/qtproject/qt/android/QtActivityDelegate.java4
1 files changed, 1 insertions, 3 deletions
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) {