qt6-bb10/tests/auto/widgets
Eskil Abrahamsen Blomfeldt 391e3aeef4 Fix char format of preedit text in empty text block
When a text block is empty, and we are adding preedit text to it,
we need to merge the format of the preedit text with the current
format of the cursor, otherwise we will use a default format and
then suddenly switch to the proper one when the text is committed.

The reason this becomes a bit complex is that there are no rules
preventing someone from using several ime attributes to specify
formats for isolated parts of the text, and no rules defining the
order of such attributes. So even if the common case is one
text format attribute for the entire string, we need to make sure
we also handle the other cases gracefully, e.g. when we are setting
different formats for different substrings and then providing these
out of order. To make sure we have these corner cases covered, we
also add a set of autotests.

[ChangeLog][Qt Widgets][TextEdit] Fixed initial char format of
input method text as it is in pre-edit mode.

Task-number: QTBUG-59196
Change-Id: I1e37928e3bd1395fec1b5591908d4c69b84eb618
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-20 10:10:26 +00:00
..
dialogs QInputDialog: prevent crash in static get*() functions when parent gets deleted 2017-02-06 14:41:46 +00:00
effects QtWidgets: Remove Windows CE. 2016-04-07 10:24:45 +00:00
gestures autotests: use QTest::createTouchDevice() 2016-06-10 13:07:17 +00:00
graphicsview tests/auto/widgets: use QCOMPARE(., nullptr) 2016-11-30 07:24:47 +00:00
itemviews Fix item keeping hover highlight even when mouse has left it 2017-03-13 15:47:10 +00:00
kernel Use QT_CONFIG(library) instead of QT_NO_LIBRARY 2017-03-06 11:27:20 +00:00
styles tests/auto/widgets: use QCOMPARE(., nullptr) 2016-11-30 07:24:47 +00:00
util Properly use the "process" feature 2017-02-27 15:44:46 +00:00
widgets Fix char format of preedit text in empty text block 2017-03-20 10:10:26 +00:00
widgets.pro