Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7
-
None
-
5
-
210063a3c (dev), fadeb174b (6.7)
-
Foundation Sprint 103, Foundation Sprint 104, Foundation Sprint 105, Foundation Sprint 106
Description
Reading the latest QDataStream docs from doc-snapshots, I still see that it mentions incorrect serialization formats here and there.
For example:
To take one example, a char * string is written as a 32-bit integer equal to the length of the string including the '\0' byte, followed by all the characters of the string including the '\0' byte. When reading a char * string, 4 bytes are read to create the 32-bit length value, then that many characters for the char * string including the '\0' terminator are read.
This is only correct if the string size fits into 32 bits.
The current code for serializing a const char * string is more complicated, and contains the same logic as other string/container serialization.
The scope of this task is to find all such places in QDataStream documentation and fix them.
Attachments
Issue Links
- relates to
-
QTBUG-73386 Serializing Qt Data Types Documentation not up to date
- Closed