moin creator devs of either affiliation,

got your attention? ;)
thorough i/o error checking is rather laborious when using QFile 
directly. maybe that's the reason why we had almost none so far (notable 
exception: maemo handling code). ;)
but error checking is important, and there is no such thing as "this 
cannot possibly go wrong". ignoring errors leads either directly to data 
loss (see QTCREATORBUG-1619), or at least delays the moment until the 
user discovers the problem and can try to salvage the situation.
so i went through a monumental effort of adding write error checking 
pretty much everywhere and read error checking in many places.
to make things easy, i added some convenience classes:

- Utils::FileReader: fetch a file's contents, conveniently 
accumulating/displaying error messages
- Utils::FileSaver: QFile replacement with error handling and 
transactional behavior
- Utils::TempFileSaver: QTemporaryFile replacement with error handling
these can be found in utils/fileutils.h
commit 45c9cf7a can be considered the prime example of using them.

- Utils::SaveFile: transactional file writing. low-level part. you will 
probably not need to use it directly.

if you "do stuff with files", you should get a review from me. for 
"stuff with processes" this is a good idea as well.


_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-creator

Reply via email to