[Interest] Strange undeletable QTemporaryFile. Is it a bug?

Guido Seifert wargand at gmx.de
Fri Aug 23 19:53:42 CEST 2013


Hi, Thiago.
 
> QTemporaryFile keeps the file open. You can't delete it with QFile::remove, you 
> have to let QTemporaryFile do it. Or, you must destroy the QTemporaryFile 
> object first, so it will actually close the file. Then you can delete it.

This is strange. Of course I checked with open(). First thing I do when I have file problems under Windows. According to this the file was closed. So I think this should count as bug then. I would have had far less trouble to understand the problem, when open returned 'true'. If what you say is true, and I don't doubt it, is there a good reason not fix QTemporaryFile so its open() functions always returns true?

Guido 





More information about the Interest mailing list