2 Commits

Author SHA1 Message Date
Ivan Solovev
06eac4ebc8 tst_manualqdatastream: fix gcc error
GCC has a bug [1] that does not allow to specialize templates
outside of a namespace.
An attempt to build the test results in the following error:

 tst_manualqdatastream.cpp:18:15: error: explicit specialization in
 non-namespace scope ‘class tst_QDataStream’

Fix it by converting the template specializations into simple function
overloads.

[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282

Change-Id: I7803cce1687ca8ae992f1a57394346eb6fc90c8b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit b9c8c57e3f8f2a07c22059d9c8e7210469198200)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-29 08:51:57 +00:00
Øystein Heskestad
fd48ce0b73 Add support for containers > 4 Gi elements in QDataStream
The format is changed from 6.7 to support more than UINT32_MAX - 1
elements. The format used to have a quint32 size. Now if the size is
larger or equal to 0xfffffffe (2^32 -2) the old size is an extend
value 0xfffffffe followed by one quint64 with the actual value. The
32 bit size with all bits set is still used as null value.

Fixes: QTBUG-105034
Change-Id: I62188be170fe779022ad58ab84a54b1eaf46e5d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-10-23 15:10:28 +02:00