> open() means it succeeded in opening.
> 
> QTemporaryFile::close() truncates and repositions, but doesn't *close* the 
> file. If you really want to close, destroy the object or force it to open a 
> new 
> file (with a new name).

Bah, stupid me. Wrong function. I meant of course 'isOpen()', sorry. Am I so 
wrong that I expect a 'true' when the file is still open? 

But, erm... yes... now that you say it, I can even find this behaviour in the 
docs:

Reopening a QTemporaryFile after calling close() is safe. For as long as the 
QTemporaryFile object itself is not destroyed, the unique temporary file will 
exist and be kept open internally by QTemporaryFile.

I can't say that I am very happy with a non-closing close() and a lying 
isOpen(). Even if documented, it goes against any expectations.

Guido
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to