<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On 08 Nov 2013, at 12:41, Yves Bailly <<a href="mailto:yves.bailly@laposte.net">yves.bailly@laposte.net</a>> wrote:<br><div><blockquote type="cite"><blockquote type="cite"><font color="#000000">]</font>I would recommend against using QDataStream for anything else than reading back what was written using QDataStream.</blockquote>This is what I called a step backward.<br></blockquote><div><br></div>It’s just stating a fact. QDataStream isn’t a generic cross-framework class, it’s not based on any standard. Its internal structure is completely undocumented. It’s compatible only with itself, and then, only with specific versions of itself. It even encodes the QDataStream format version in the stream itself.</div><div><br></div><div>So it’s not a step backward. It’s just a special-purpose class used for more than it’s designed for.</div><div><br></div><div>Personally I think using fstream or htons is perfectly fine. Both are portable, beyond what QDataStream does.</div><div><br></div><div>Andreas</div><div><br></div><br></body></html>