On Wednesday 28 May 2014 19:33:42 Aaron J. Seigo wrote:
>    int endPoint = ds.device()->pos();
>     ds.device()->seek(savePoint);
>     ds << 0;
>     ds.device()->seek(endPoint);
>     ds << 1337;
>     ++records;

This could break if QDataStream decides to buffer the changes, i.e. not flush 
before you seek() the underlying device. But OK the API docs for QDataStream 
don't mention buffering, the buffering happens one layer down, in QIODevice 
itself.

My other fear was a header when starting a new QDataStream but you're not 
doing that, so that's fine :)

OK, I stand corrected, thanks for the example code. Looks good to me.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to