qt5base-lts/tests/auto/gui/text
Jan Arve Sæther 8d6d1d6fea Fix bug in QTextLayout::min/maxWidth for WrapAtWordBoundaryOrAnywhere
In that specific wrapping mode, it will first try a normal word wrap. If
it doesn't fit within the specified line width it will discard the
result of that and try WrapAnywhere by calling layout_helper()
recursively. The problem was that at the point it called itself again it
had already adjusted eng->maxWidth:

        eng->maxWidth += line.textWidth;

This was not restored, but carried on to the recursive call to
layout_helper(), so the end result was that the maximumWidth would
accumulate text widths from parts of the same line twice.

Due to the same recursive behavior the minimumWidth also had a problem:
It always returned the width of the widest word because it took the
qMax() of the minimum widths of the two passes, (WordWrap and then
WrapAnywhere) effectively making the minimum width always be the width
of the widest word (even though it could wrap at finer granularity).

Pick-to: 5.15
Task-number: QTBUG-77337
Change-Id: Ie7e9c17b157506352c2da38cc7f4a8dfa1283966
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-05-05 19:17:35 +02:00
..
qabstracttextdocumentlayout cmake: add tests/auto/gui/text 2019-11-01 13:28:59 +00:00
qcssparser Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qfont Merge remote-tracking branch 'origin/5.15' into dev 2020-02-26 18:39:21 +01:00
qfontcache Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qfontdatabase Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qfontmetrics Merge remote-tracking branch 'origin/5.15' into dev 2020-02-28 09:48:30 +01:00
qglyphrun cmake: add tests/auto/gui/text 2019-11-01 13:28:59 +00:00
qinputcontrol Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qrawfont Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qstatictext Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qsyntaxhighlighter Merge remote-tracking branch 'origin/dev' into merge-dev 2020-01-24 13:17:33 +01:00
qtextblock Remove references to QTextDocumentPrivate from public API 2020-03-04 08:28:04 +01:00
qtextcursor Remove references to QTextDocumentPrivate from public API 2020-03-04 08:28:04 +01:00
qtextdocument Always encode HTML as utf-8 2020-04-21 15:46:36 +02:00
qtextdocumentfragment Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qtextdocumentlayout Fix QTextDocumentLayout test with certain fonts 2020-05-04 08:00:37 +02:00
qtextformat Fix distribution of font properties in QTextFormat 2020-03-10 10:58:03 +01:00
qtextlayout Fix bug in QTextLayout::min/maxWidth for WrapAtWordBoundaryOrAnywhere 2020-05-05 19:17:35 +02:00
qtextlist Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qtextmarkdownimporter CMake: Regenerate tests projects 2020-03-12 11:41:39 +01:00
qtextmarkdownwriter Merge remote-tracking branch 'origin/5.15' into dev 2020-04-22 15:28:01 +02:00
qtextobject cmake: add tests/auto/gui/text 2019-11-01 13:28:59 +00:00
qtextodfwriter Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qtextpiecetable Remove references to QTextDocumentPrivate from public API 2020-03-04 08:28:04 +01:00
qtextscriptengine Update to Harfbuzz 2.6.4 2020-03-04 08:28:04 +01:00
qtexttable Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qzip Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
CMakeLists.txt Update to Harfbuzz 2.6.4 2020-03-04 08:28:04 +01:00
text.pro Markdown: fix several issues with lists and continuations 2019-05-08 20:28:28 +00:00