qt6-bb10/tests/auto/gui/text
Eskil Abrahamsen Blomfeldt fccd419dd6 Remove false Q_UNREACHABLE from shaping code
This was added by 9ff76c27b9 on
the basis that it signifies a shaping error and would later assert
or crash.

But the line is easily reachable by user code. If Harfbuzz returns
0 glyphs, it just means it is unable to shape the string, for instance
if the input string only contains default ignorables (like a ZWJ)
and does not have any appropriate glyph to use for replacement.

Qt expects there to always be at least one glyph in the output
(num_glyphs == 0 is used to indicate shaping is not yet done), so
to avoid asserts later on, we simply populate the output with a
single 0 token, which is a required entry in the font that is
reserved for representing unrepresentable characters.

This also adds a test and therefore a zero-width joiner to the test
font to reproduce the issue.

[ChangeLog][QtGui][Text] Fixed a possible crash with certain fonts
when shaping strings consisting only of control characters.

Fixes: QTBUG-89155
Pick-to: 5.15
Pick-to: 6.0
Change-Id: Ia0dd6a04844c9be90dcab6c464bebe339a3dab11
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2021-02-03 09:44:44 +01:00
..
qabstracttextdocumentlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qcssparser Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfont tst_qfont: expect failure on font testcase for QEMU ARMv7 2021-01-22 09:00:24 +02:00
qfontcache Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfontdatabase Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfontmetrics Remove the qmake project files 2021-01-07 15:32:28 +01:00
qglyphrun Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
qinputcontrol Remove the qmake project files 2021-01-07 15:32:28 +01:00
qrawfont Remove the qmake project files 2021-01-07 15:32:28 +01:00
qstatictext Remove the qmake project files 2021-01-07 15:32:28 +01:00
qsyntaxhighlighter Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextblock Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextcursor Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextdocument Introduce QUrlResourceProvider to load resources for HTML 2021-01-12 15:33:10 +03:00
qtextdocumentfragment Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextdocumentlayout Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextformat Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextimagehandler Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextlayout Avoid overflow in text layout 2021-01-28 11:02:18 +01:00
qtextlist Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextmarkdownimporter tst_qtextmarkdown: blacklist tests for QEMU ARMv7 2021-01-08 09:04:55 +02:00
qtextmarkdownwriter tst_qtextmarkdown: blacklist tests for QEMU ARMv7 2021-01-08 09:04:55 +02:00
qtextobject Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextodfwriter Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextpiecetable Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtextscriptengine Remove the qmake project files 2021-01-07 15:32:28 +01:00
qtexttable Remove the qmake project files 2021-01-07 15:32:28 +01:00
qzip Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Android: exclude tests crashing at start 2020-11-16 13:35:44 +02:00