Re: [Development] QTemporaryDir API

2011-11-27 Thread Thiago Macieira
On Sunday, 27 de November de 2011 15.45.47, David Faure wrote: > On Friday 18 November 2011 11:12:16 lars.kn...@nokia.com wrote: > > Agree, it can be solved by documentation and giving it a name that makes > > it obvious. QDir::removeAllDirsandFilesRecursive() for example. > > OK. I named it remove

Re: [Development] QTemporaryDir API

2011-11-27 Thread David Faure
On Friday 18 November 2011 11:12:16 lars.kn...@nokia.com wrote: > Agree, it can be solved by documentation and giving it a name that makes > it obvious. QDir::removeAllDirsandFilesRecursive() for example. OK. I named it removeAllContentsRecursively (slightly shorter). > So my proposal would be to

Re: [Development] QTemporaryDir API

2011-11-18 Thread lars.knoll
On 11/18/11 11:59 AM, "ext David Faure" wrote: >On Friday 18 November 2011 11:32:09 Olivier Goffart wrote: >> On Friday 18 November 2011 05:01:44 Jason A. Donenfeld wrote: >> > A general [static] recursive remove directory function belongs in >>QDir. >> > >> > A member recursive remove *this* pa

Re: [Development] QTemporaryDir API

2011-11-18 Thread lars.knoll
On 11/18/11 11:32 AM, "ext Olivier Goffart" wrote: >On Friday 18 November 2011 05:01:44 Jason A. Donenfeld wrote: >> A general [static] recursive remove directory function belongs in QDir. >> >> A member recursive remove *this* particular *temporary* directory >>function >> belongs in QTemporary

Re: [Development] QTemporaryDir API

2011-11-18 Thread David Faure
On Friday 18 November 2011 11:32:09 Olivier Goffart wrote: > On Friday 18 November 2011 05:01:44 Jason A. Donenfeld wrote: > > A general [static] recursive remove directory function belongs in QDir. > > > > A member recursive remove *this* particular *temporary* directory > > function belongs in Q

Re: [Development] QTemporaryDir API

2011-11-18 Thread Olivier Goffart
On Friday 18 November 2011 05:01:44 Jason A. Donenfeld wrote: > A general [static] recursive remove directory function belongs in QDir. > > A member recursive remove *this* particular *temporary* directory function > belongs in QTemporaryDir. > > Putting a generalized recursive remove directory f

Re: [Development] QTemporaryDir API

2011-11-18 Thread Jason A. Donenfeld
A general [static] recursive remove directory function belongs in QDir. A member recursive remove *this* particular *temporary* directory function belongs in QTemporaryDir. Putting a generalized recursive remove directory function into QTemporaryDir makes no organizational sense. $0.02 - Jason

Re: [Development] QTemporaryDir API

2011-11-17 Thread Roopesh Chander
On Thu, Nov 17, 2011 at 9:54 PM, David Faure wrote: > – konqueror sessions which are saved on disk as directories. > I'm sure there are other similar cases of apps saving internal stuff as > directories. Calling these "temporary" might be a bit arguable, but if the > general agreement here is tha

Re: [Development] QTemporaryDir API

2011-11-17 Thread Charley Bay
On Thu, Nov 17, 2011 at 9:24 AM, David Faure wrote: > On Thursday 17 November 2011 17:14:06 Robin Burchell wrote: > > On Thu, Nov 17, 2011 at 5:11 PM, David Faure > wrote: > > > The method already asserts if the path is empty or is ".", we could > make > > > that stricter to catch more bugs (err

Re: [Development] QTemporaryDir API

2011-11-17 Thread David Faure
On Thursday 17 November 2011 17:14:06 Robin Burchell wrote: > On Thu, Nov 17, 2011 at 5:11 PM, David Faure wrote: > > The method already asserts if the path is empty or is ".", we could make > > that stricter to catch more bugs (error instead of debug-mode-only > > assert, and refuse more paths, i

Re: [Development] QTemporaryDir API

2011-11-17 Thread Robin Burchell
On Thu, Nov 17, 2011 at 5:11 PM, David Faure wrote: > The method already asserts if the path is empty or is ".", we could make that > stricter to catch more bugs (error instead of debug-mode-only assert, and > refuse more paths, including the home dir). Why does it need to be static at all, as op

Re: [Development] QTemporaryDir API

2011-11-17 Thread David Faure
On Thursday 17 November 2011 13:52:55 lars.kn...@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 t

Re: [Development] QTemporaryDir API

2011-11-17 Thread André Pönitz
On Thursday 17 November 2011 14:52:55 ext lars.kn...@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 mat

Re: [Development] QTemporaryDir API

2011-11-17 Thread lars.knoll
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 bug

Re: [Development] QTemporaryDir API

2011-11-16 Thread Andre Somers
Op 16-11-2011 18:56, David Faure schreef: > On Wednesday 16 November 2011 18:26:25 Andre Somers wrote: >> Op 16-11-2011 18:13, David Faure schreef: >>> Hello, >>> >>> As previously discussed on qt5-feedback, I wrote QTemporaryDir and >>> submitted it to gerrit at http://codereview.qt-project.org/#c

Re: [Development] QTemporaryDir API

2011-11-16 Thread David Faure
On Wednesday 16 November 2011 18:26:25 Andre Somers wrote: > Op 16-11-2011 18:13, David Faure schreef: > > Hello, > > > > As previously discussed on qt5-feedback, I wrote QTemporaryDir and > > submitted it to gerrit at http://codereview.qt-project.org/#change,8297 > > After a few reviews from Thia

Re: [Development] QTemporaryDir API

2011-11-16 Thread David Faure
On Wednesday 16 November 2011 18:22:23 Harri Porten wrote: > On Wed, 16 Nov 2011, David Faure wrote: > > Thiago suggested that I post the header file here, to see if anyone had > > feedback on the (rather short) API. > > > > Actually I'll post the .cpp file too, since the documentation of the API

Re: [Development] QTemporaryDir API

2011-11-16 Thread Andre Somers
Op 16-11-2011 18:13, David Faure schreef: > Hello, > > As previously discussed on qt5-feedback, I wrote QTemporaryDir and submitted > it to gerrit at http://codereview.qt-project.org/#change,8297 > After a few reviews from Thiago (and redoing the implementation on Windows) > it's now ready for subm

Re: [Development] QTemporaryDir API

2011-11-16 Thread Harri Porten
On Wed, 16 Nov 2011, David Faure wrote: > Thiago suggested that I post the header file here, to see if anyone had > feedback on the (rather short) API. > > Actually I'll post the .cpp file too, since the documentation of the API is > there :) I tried without the documentation. Feedback based on

[Development] QTemporaryDir API

2011-11-16 Thread David Faure
Hello, As previously discussed on qt5-feedback, I wrote QTemporaryDir and submitted it to gerrit at http://codereview.qt-project.org/#change,8297 After a few reviews from Thiago (and redoing the implementation on Windows) it's now ready for submission. Thiago suggested that I post the header file