qt5base-lts/src/widgets
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
..
accessible Add ExpandCollapse UI Automation pattern to combo boxes 2022-06-22 00:08:34 +02:00
compat Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
dialogs Make the new setCurrentId the writer for the respective property 2022-06-20 16:08:35 +02:00
doc Doc: Add qthelp dependency to gui and widgets 2022-06-22 04:49:38 +02:00
effects Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
graphicsview QGraphicsScene: respect that items can override selection changes 2022-06-20 20:44:23 +02:00
itemviews Don't trigger qBound assert in QExpandingLineEdit 2022-06-29 07:24:54 +00:00
kernel IM: Don't let all widgets support IM by default 2022-07-01 10:47:17 +02:00
styles Replace QT_NO_ACCESSIBILITY with QT_CONFIG(accessibility) 2022-06-15 18:03:30 +02:00
util Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
widgets Fix QDockWidget move between screens with different dpr 2022-06-29 19:33:29 +02:00
CMakeLists.txt Add missing header files to the module sources 2022-05-12 16:34:25 +02:00
configure.cmake Core: Remove 'properties' feature 2022-02-14 12:50:59 +01:00
Qt6WidgetsMacros.cmake Revert "Ensure versionless wrappers do not introduce a new variable scope" 2021-09-06 23:56:28 +10:00
qt_cmdline.cmake CMake: Re-implement configure/qmake's command line handling in CMake 2020-08-17 08:08:20 +02:00
QtWidgets.dynlist
qtwidgets.tracepoints Reduce amount of tracepoints required for event tracking 2019-05-02 14:15:58 +00:00