On Friday, 6 de January de 2012 21.27.20, David Faure wrote: > Exception handling is a new argument though. But doesn't the current QFile > have the exact same issue then? You start writing, throw an exception, dtor > calls close, there you go. The use of an internal temporary file doesn't > change this at all, so I don't see why it should behave differently.
The file will be closed no matter what, unless you allow for the file descriptor to leak. And even if it were to leak, the writing was already done and has appeared on disk. That's very different from executing a rename upon closure. Up until that point, any observers of the file have not seen any change. Then they do and see an in-progress change being saved. No, whatever this class is, close() without commit() means "rollback". -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center Intel Sweden AB - Registration Number: 556189-6027 Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development