qt5base-lts/tests/auto/gui
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
..
image Include qproperty.h where needed 2021-11-04 21:45:02 +01:00
itemmodels emit layoutAboutToBeChanged timely 2021-07-20 21:27:27 +01:00
kernel Prevent recursive calls to QWindow::close 2021-10-18 19:06:48 +02:00
math3d tst_QMatrixNxN: fix type-punning warning 2021-06-30 23:13:28 +02:00
painting Compile autotests for Integrity 2021-09-20 17:29:04 +03:00
platform Move QtX11Extras into QtGui as private API 2021-05-10 21:19:46 +00:00
qopengl Block flaky rhi and OpenGL tests on Android 2021-05-30 23:02:53 +02:00
qopenglconfig Remove the qmake project files 2021-01-07 15:32:28 +01:00
qvulkan vulkan: Update legacy tests and examples to the modern validation layer 2021-05-31 17:16:49 +02:00
rhi rhi: Expose the maximum uniform buffer range limit 2021-11-10 13:31:05 +01:00
text Fix deserializing Qt 5.x fonts through QDataStream 2021-11-18 23:41:02 +01:00
util Remove qshadergraph files 2021-10-05 17:49:51 +02:00
CMakeLists.txt Move QtX11Extras into QtGui as private API 2021-05-10 21:19:46 +00:00