[Interest] QFile::write(const QByteArray&) does not write, all data?

Richard Moore rich at kde.org
Sat May 12 18:52:17 CEST 2018


On Sat, 12 May 2018 at 15:45, Roland Hughes <roland at logikalsolutions.com>
wrote:

> Any time a write comes up short, it is an error.
>

​That is simply incorrect. It might not be how you would like it to behave,
however it is the norm that short writes are allowed and should be handled
by the callee. This is the case in POSIX, the C standard library etc. I'm
afraid, you'll simply have to learn to live with it - an easy solution
would be to write a tiny wrapper function of your own however if you do
you'll need to be very careful with your error handling if you always want
to be able to retry.

Cheers

Rich.​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180512/dca501a7/attachment.html>


More information about the Interest mailing list