qt5base-lts/tests/auto
Richard Moe Gustavsen 3b12305575 IM: Don't let all widgets support IM by default
A new property Qt::ImEnabled was added in Qt 5.3.
Since the already existing widgets with IM support
(3rd party included) didn't implement this property,
QWidget got the fall back logic that if a widget
was queried for Qt::ImEnabled, and the returned QVariant
was invalid (the widget didn't implement it), we
would, for backwards compatibility with Qt 4, return "true"
(meaning that the widget supports IM).

But a side effect from this fallback logic, is that now
any widget that doesn't implement ImEnabled (or input
methods at all) report that they support IM. This will
confuse platforms like iOS, which uses ImEnabled to decide
if the input panel should show, and if text selection tools
should be enabled. The result is therefore that if you click
on a QPushButton, the input panel will open.

This patch will implement a more careful strategy to check if
a widget implements IM, if ImEnabled is missing. Rather than
saying that all widgets that don't implement ImEnabled supports
IM, we now require that the widget also returns a valid QVariant
for Qt::ImSurroundingText. We assume then, that a widget that
doesn't do so will anyway not be in need of input method support
from the platform.

Fixes: QTBUG-104527
Pick-to: 6.4 6.3 6.2
Change-Id: Ib391fd1daae92c4325e9ccb59730fbdd7c9328fc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-07-01 10:47:17 +02:00
..
bic/data Add BiC data for the new way to do BiC testing 2022-05-12 13:33:41 +03:00
cmake Fix memory leaks 2022-06-15 23:58:16 +02:00
concurrent QtConcurrent: prevent conversion of ReduceOption to initial value 2022-05-20 17:11:15 +02:00
corelib Support markdown in QTextEditMimeData; fix pasting trailing newlines 2022-06-24 22:42:28 +02:00
dbus Fix QDBusInterface crashing with empty path on construction 2022-06-27 14:02:47 +02:00
gui Avoid including qopenglfunctions header files if Qt is built with GLES2 2022-06-28 10:52:23 +02:00
guiapplauncher
network QHttpHeaderParser: Allow larger fields but restrict total size 2022-06-27 14:02:47 +02:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other unblacklist passing tests 2022 2022-06-23 01:36:01 +02:00
printsupport Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
sql Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
testlib qtestlib: exit with error if a test is invoked with unknown data tag 2022-06-28 18:06:33 +02:00
tools tst_moc: fix build with GCC 12 2022-06-24 19:05:53 -07:00
wasm Create a promise wrapper for C++ and port existing uses 2022-06-30 01:20:28 +02:00
widgets IM: Don't let all widgets support IM by default 2022-07-01 10:47:17 +02:00
xml Add QDom internalSubset implementation 2022-06-23 02:18:39 +08:00
CMakeLists.txt Only configure one test for wasm 2022-05-12 18:55:04 +02:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00