qt5base-lts/tests/auto
Thiago Macieira 58bea7f3a2 QCborStreamReader::next: don't allocate too much memory in a QBA
Because CBOR strings are encoded in UTF-8, it's possible that the string
that won't fit a QString in UTF-16 would still fit QByteArray in UTF-8
(e.g., anything US-ASCII and most Latin text).

The previous solution was an improvement because we used to read into a
QByteArray then convert the QByteArray to QString, thus using 3x the
amount of memory (1x in QByteArray, 2x in QString). The previous commit
skipped the middle allocation and made the regular readString() function
do the decoding either directly on source memory or by reading in small
chunks (16 kB).

Future improvement for Qt 6.1: add readStringChunk(char16_t *, qsizetype)
so we can do the validation / skipping at O(1) memory.

Pick-to: 5.15 6.0
Change-Id: I7b9b97ae9b32412abdc6fffd1645458c655cc566
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-12-07 22:54:39 +00:00
..
cmake CMake: Change generated resources naming 2020-11-24 21:51:29 +01:00
concurrent QtConcurrent: filter/map reduction without default ctor 2020-12-04 15:36:50 +01:00
corelib QCborStreamReader::next: don't allocate too much memory in a QBA 2020-12-07 22:54:39 +00:00
dbus QChar: make construction from integral explicit 2020-11-15 14:41:05 +01:00
gui Fix QImage::setPixelColor on RGBA64_Premultiplied 2020-12-04 15:09:47 +01:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
installed_cmake
network Add SameSite API to QNetworkCookie 2020-12-07 22:38:37 +01:00
opengl Remove tst_QGL 2020-08-28 11:43:11 +02:00
other Inline access to the QBindingStorage 2020-11-30 23:02:27 +00:00
printsupport Fit tst_qprinterinfo in case there are printers in local network 2020-11-21 06:11:37 +01:00
shared Remove most compiler warnings about missing overrides 2020-09-11 00:20:47 +02:00
sql Cleanup remaining QVariant::Type uses in Qt Sql 2020-10-17 12:01:54 +02:00
testlib Android: exclude faulty tst_selftests 2020-11-25 23:08:09 +02:00
tools uic/rcc: Use QT_VERSION_MAJOR for major version 2020-12-07 11:37:35 +01:00
widgets Fix hashing of QPersistentModelIndex 2020-12-04 06:00:38 +00:00
xml QChar: make construction from integral explicit 2020-11-15 14:41:05 +01:00
.prev_CMakeLists.txt CMake: Regenerate projects 2020-09-22 19:08:53 +02:00
auto.pro Don't error out when configuring Qt on a headless system 2020-09-26 14:36:13 +02:00
CMakeLists.txt CMake: Fix building with -DQT_FEATURE_gui=OFF 2020-09-15 20:05:32 +02:00
network-settings.h Network self-test: make it work with docker/containers 2020-11-17 19:56:06 +01:00