QIODevice::ReadWrite | QIODevice::Truncate when disk full
Hi Qt members,
When i do a try to overwrite several existing files using QIODevice::ReadWrite | QIODevice::Truncate , and the disk gets full, all the files become null.
What must the right way to handle this situation ?
I use -
QTextStream stream( &file );
stream << document.toString();
What I can think of, is writing to a WriteOnly file and checking the size of the file, if the file is null then cancel the operation, else replace the original file with the temporary file .