[Interest] Current QDataStream format documentation?

Ch'Gans chgans at gna.org
Sat Sep 24 02:50:10 CEST 2016


On 24 September 2016 at 05:05, Giuseppe D'Angelo
<giuseppe.dangelo at kdab.com> wrote:
> Il 23/09/2016 17:14, Thiago Macieira ha scritto:
>> The expectation is that you read QDataStream with QDataStream. You don't need
>> to know what it writes, only that it can read what it writes.
>
> Where has this expectation *ever* been stated? The very fact that we

Adding my 2 cents, I haven't use QDataStream stream much, yet i'm very
well aware of this restriction. I think the documentation is very
explicit about this. And that might be the reason i haven't use it
much.

QDataStream is black-box system for Qt to Qt exchange.

If the other side of the pipe is arduino, maybe try to use JSON (very
easy to use on Qt side), and i'm sure arduino as some library for
this.

Chris

> document the wire format is so that people can use something different
> than QDataStream to read the output (or provide input into it).
>
> I keep my point that we have problems in the process, because:
>
> 1) at release time (?) we bump QDataStream's output version enum without
> updating that documentation page about the wire format. (I don't even
> understand how the decision about bumping the version number or not
> bumping it is done. A flag in [ChangeLog]? Manual grepping? Emails on
> the list?)
>
> 2) we have types which change serialization format depending on the
> stream's version, and we don't document what's exactly serialized for
> each version. What do I get if, when using 5.8, I stream a QDateTime
> using the Qt_3_3 format?
>
> 2b) we must enforce as a review rule that the wire format documentation
> page must be updated together with every patch that changes how a type
> is serialized.

That's a lot of work, and that might be (one of) the reason why
QDataStream is a black box.
That's at least how I understand it.

> If you think the above is wrong, then please do submit a change that
> gets rid of the wire format page and adds a note in QDataStream's
> documentation to tell people that QDataStream only interacts with
> QDataStream.
>
> My 2 c,
> --
> Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
> KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
> KDAB - Qt, C++ and OpenGL Experts
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>



More information about the Interest mailing list