qt5base-lts/tests
Eskil Abrahamsen Blomfeldt 71faedc5b4 Fix deserializing Qt 5.x fonts through QDataStream
In Qt 5, fonts had both singular family and plural families properties,
and both were stored separately when streaming through QDataStream. The
families list was treated as an extension of family in this case, and
the primary font family was always the singular family property.

In Qt 6, it has been merged into one and family() is now just a
convenience for families().at(0).

But when reading files generated with Qt 5, we would ignore the fact
that these were previously separated. We would first read the family
entry into the families list, and then we would later overwrite this
with  an empty families list.

Instead, we detect streams created with Qt 5.15 or lower and make sure
we append the families list instead of overwriting it in this case. In
addition, we need to make sure we split up the list again when
outputting to Qt 5.x.

This adds a file generated with QDataStream in Qt 5.15 to the test to
verify.

[ChangeLog][Fonts] Fixed a problem deserializing the family of fonts
that had been serialized using QDataStream in Qt 5.

Pick-to: 6.2
Fixes: QTBUG-97995
Change-Id: Id3c6e13fc2375685643caee5f8e3009c00918ccb
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2021-11-18 23:41:02 +01:00
..
auto Fix deserializing Qt 5.x fonts through QDataStream 2021-11-18 23:41:02 +01:00
baseline Add baseline test that allows comparing the rendering of widgets 2021-11-18 03:36:24 +00:00
benchmarks Rename and restructure the baseline (lancelot) testing code 2021-11-16 14:01:50 +01:00
global
libfuzzer CMake: Bump almost all cmake_minimum_required calls to 3.16 2021-09-22 19:36:49 +02:00
manual Rename and restructure the baseline (lancelot) testing code 2021-11-16 14:01:50 +01:00
shared locale: INTEGRITY does not define LC_MEASUREMENTS 2021-09-21 17:56:54 +00:00
testserver Network self-test: make it work with docker/containers 2020-11-17 19:56:06 +01:00
CMakeLists.txt CMake: Refactor optimization flag handling and add optimize_full 2020-10-06 10:07:05 +02:00
README

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.