[Development] Weird offseting in QDataStream
Andreas Aardal Hanssen
andreas at hanssen.name
Fri Nov 8 11:37:49 CET 2013
On 08 Nov 2013, at 11:32, André Somers <andre at familiesomers.nl> wrote:
> Eskil Abrahamsen Blomfeldt schreef op 8-11-2013 11:20
>> QDataStream supports reading and writing floats and doubles, but it
>> might use more bytes than necessary to represent them in the stream.
>> the main ...
> I don't see what's wrong with such a mode, as long as the documentation
> warns that it won't work reliably with qreal (before 5.2, I read). You
To me it sounds like Qt needs a new lower-level class for serializing and deserializing stuff.
QDataStream is for Qt only, it’s incompatible with all other binary formats out there, with the undocumented exception for cases where primitive types match.
I would recommend against using QDataStream for anything else than reading back what was written using QDataStream.
More information about the Development