[Development] QFile: writing via a temporary file

Thiago Macieira thiago.macieira at intel.com
Fri Jan 6 20:11:29 CET 2012


On Friday, 6 de January de 2012 18.34.21, David Faure wrote:
> On Thursday 05 January 2012 22:38:37 Thiago Macieira wrote:
> > What happens if you open the file in read or read-write mode while the
> > flag
> > is on?
> 
> I think that should just ignore the request for a temp file, since it cannot
> possibly be honoured.
> 
> Or if you prefer it could print a warning and fail.

The first solution doesn't look nice. It would have to fail opening completely.

But I think I prefer a QSaveFile, derived from QFile, with the proper 
semantics.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120106/269fc1d7/attachment.sig>


More information about the Development mailing list