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

alexander golks alex at golks.de
Mon May 14 08:28:47 CEST 2018


Am Sun, 13 May 2018 16:29:48 -0700
schrieb Thiago Macieira <thiago.macieira at intel.com>:

> On Sunday, 13 May 2018 09:32:23 PDT Elvis Stansvik wrote:
> > QDataStream can operate
> > fine on an QIODevice that does partial writes (like QFile).  
> 
> No, it cannot. If there's a failure to write, the stream is corrupt and 
> unrecoverable.
> 

so far, thanks for all this explanations! learned a lot.

> In fact, QDataStream can't recover from any errors.

as you've said, my origin problem is no error.
wouldn't it be possible for QDataStream to handle this no-errors, too?

otherwise, as i still don't know the "no-error" conditions, i would always need to use something like QDataStream::writeRawData,
which is barely more then a QFile::write, and no other operator<< methods.

-- 
/*
 *panic("Aarggh: attempting to free lock with active wait queue - shoot Andy");
 *        linux-2.0.38/fs/locks.c
 */



More information about the Interest mailing list