There's a memory leak on the file returned from here when it isn't deleted by the caller.
I think in this case we should just return a QFile (even though that's more memory on the stack)