qt5base-lts/tests
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
..
auto Fix bug in QTextLayout::min/maxWidth for WrapAtWordBoundaryOrAnywhere 2020-05-05 19:17:35 +02:00
baselineserver Merge remote-tracking branch 'origin/5.15' into dev 2020-02-28 09:48:30 +01:00
benchmarks Merge remote-tracking branch 'origin/5.15' into dev 2020-04-22 15:28:01 +02:00
global
libfuzzer Merge remote-tracking branch 'origin/5.15' into dev 2020-04-22 15:28:01 +02:00
manual Merge remote-tracking branch 'origin/5.15' into dev 2020-04-08 20:11:39 +02:00
shared Fix isRunningArmOnX86 unused function warning 2020-02-03 15:03:51 +01:00
testserver Fix perl script warning 2020-03-19 14:15:04 +00:00
.prev_CMakeLists.txt
CMakeLists.txt CMake: Handle finding of OpenSSL headers correctly 2020-04-08 22:03:24 +02:00
README
tests.pro

This directory contains autotests and benchmarks based on Qt Test. In order
to run the autotests reliably, you need to configure a desktop to match the
test environment that these tests are written for.

Linux X11:

   * The user must be logged in to an active desktop; you can't run the
     autotests without a valid DISPLAY that allows X11 connections.

   * The tests are run against a KDE3 or KDE4 desktop.

   * Window manager uses "click to focus", and not "focus follows mouse". Many
     tests move the mouse cursor around and expect this to not affect focus
     and activation.

   * Disable "click to activate", i.e., when a window is opened, the window
     manager should automatically activate it (give it input focus) and not
     wait for the user to click the window.