qt5base-lts/tests/auto/gui
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
..
image Remove deprecated members from QtGui/image classes 2020-04-29 06:20:07 +02:00
itemmodels Remove deprecated members from several QtGui classes 2020-04-27 12:21:29 +02:00
kernel Remove deprecated members from several QtGui classes 2020-04-27 12:21:29 +02:00
math3d Revert "Remove flagBits from QMatrix4x4" 2020-03-04 15:54:38 +00:00
painting Port qtbase/tests/auto/gui/painting to CMake 2020-04-27 14:34:56 +02:00
qopengl Get rid of QT_OPENGL_ES* 2020-04-17 11:50:24 +02:00
qopenglconfig Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
qvulkan Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
rhi Hotfix for int->qsizetype fallout in QShader 2020-05-05 11:34:39 +02:00
text Fix bug in QTextLayout::min/maxWidth for WrapAtWordBoundaryOrAnywhere 2020-05-05 19:17:35 +02:00
util Move undo framework out of Qt Widgets 2020-03-30 12:36:29 +02:00
.prev_CMakeLists.txt cmake: Remove APPLE prefix from platform names 2020-03-16 17:57:56 +01:00
CMakeLists.txt cmake: Remove APPLE prefix from platform names 2020-03-16 17:57:56 +01:00
gui.pro Introduce the Qt graphics abstraction as private QtGui helpers 2019-06-13 10:13:45 +02:00