From 7fac45c313c9f7b649adcc5d853112adc2f85566 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 11 Oct 2021 14:26:38 +0200 Subject: [PATCH] QIOSTextInputOverlay: listen for selection changes, also for Qt::ImReadOnly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The focus object can emit selection updates (e.g from mouse drag), and accept modifying it through IM when dragging on the handles, even if it doesn't accept text input and IM in general (and hence return false from inputMethodAccepted()). This is typically the case for read-only text fields. So we should listen for selection changes and enable handles also for this case (unless the IM hints tells us explicitly not to use handles/edit menu). Fixes: QTBUG-91545 Change-Id: I2855505fc229e954b2c43f5e11374e64bba7eb4e Reviewed-by: Tor Arne Vestbø