[Development] QTemporaryDir API

André Pönitz andre.poenitz at nokia.com
Thu Nov 17 15:56:29 CET 2011


On Thursday 17 November 2011 14:52:55 ext lars.knoll at nokia.com wrote:
> Hi David,
> 
> looks good in general.
> 
> I am however concerned about the static removeDir() method. This one is
> pretty much the equivalent of a 'rm -rf'. Since it's not limited to
> temporary directories, so it doesn't match the class.
> 
> It's also a rather dangerous operation, and I'm worried we'll see bugs in
> it's usage leading to users home directories being blown away.

The alternative is that each user rolls his own. Of course, he can't
blame Qt then if that fails...

I'd actually like to have that functionality in Qt, but with a name that
stands out and makes it very clear that it is "dangerous".

removeAllFilesAndDirectoriesRecursively(..., Qt::IReallyMeanIt)  ;-)

Andre'



More information about the Development mailing list