On Thu, Jan 5, 2012 at 8:32 PM, David Faure <fa...@kde.org> wrote: > Now there's just one question remaining: even if the rule is that all > operations apply to the temp file, between open and close... what should > QFile::fileName() return? The temp file name, to obey that rule, or the target > file name, for symmetry with setFileName()? > > I'm tempted to say: the latter, because the temp file is really internal, and > to prevent surprises (breaking symmetry with setFileName). Of course it means > file.remove() won't be the same as QFile::remove(file.fileName()) anymore... > :)
But imagine the following scenario: file.setUseTemporaryFile(true) file.open() file.write() ----> APP CRASHES If file.fileName() would return the original filename, how one can restore the temp file? Would the temporary filename be deterministic? Cheers, -- ------------------------------------------------------- Artur Duque de Souza openBossa INdT - Instituto Nokia de Tecnologia ------------------------------------------------------- Blog: http://blog.morpheuz.cc PGP: 0xDBEEAAC3 @ wwwkeys.pgp.net ------------------------------------------------------- _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development