[Interest] Strange undeletable QTemporaryFile. Is it a bug?
wargand at gmx.de
Sat Aug 24 10:08:27 CEST 2013
People can do many things wrong. This is no argument. If this function would have been private or protected, it would have been an alarm signal for me and I would have looked into the docs. For me was QTemporaryFile just a QFile with a little syntactic sugar for handling temporary files. It never occured to me that I had to read anything. Another very severe problem is that I wasn't even able to see my mistake under Linux. remove() apparently worked there. Of course, the file wasn't really removed there either, but there is no obvious way to see that.
> Overriding a public method to make it private doesn't make much sense
> because this restriction can be easily circumvented by casting the
> pointer/reference to a base class (explicitly or by passing it to a
> function, in the context of this thread, expects a QFile or even more
> generic QIODevice).
More information about the Interest