QDataStream out2(&file); // and module A write those datas to a file.
     out2 <<  bai.size();
     out2 <<  bai;


All of the following is IMHO:

I think that if you are going to read the size back as an 'int'
you should insure that an 'int' is written in the first place:

    out2 << (int)bai.size();

Sure, you can look and see that the size() of a QByteArray returns
an 'int', but that is only as of today. You should get into the habit
of controlling the types written to QDataStreams.

Bill


_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to