[Qt-interest] anyone know why QDir::mkpath() isn't static?

Scott Aron Bloom Scott.Bloom at onshorecs.com
Tue Apr 12 18:38:08 CEST 2011


-----Original Message-----
From: qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com [mailto:qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com] On Behalf Of Thiago Macieira
Sent: Tuesday, April 12, 2011 9:27 AM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] anyone know why QDir::mkpath() isn't static?

Em terça-feira, 12 de abril de 2011, às 09:19:38, Scott Aron Bloom escreveu:
> I have found there are a number of little idiosyncrasies in the QFile, 
> QFileInfo, and QDir code that can be confusing and worst case create a 
> bug..  You just get used to them
> 
> With mkpath... I would prefer if there was a static as well as a 
> non-static member...  I wouldn't even mind if the QDir threw an assert 
> on the static member if the path sent in was relative.

For those interested, we're still having a discussion on the ugliness and wrongs of QFile, QDir and QFileInfo in the #qt-labs channel. There's a lot that could be done better and the developers agree.

The question is: when the time comes for when a source-incompatible is permitted, what is better, to keep compatibility with thousands of existing programs or to make a new, better but incompatible API?
---------------------------
IMHO... 
I would look at in a similar way that you redid the QHttp/QFtp -> QNetworkAccessManager change over...

Create a new "correct" interface name, and deprecate the old ones...

Maybe QFileSystemMananger??

Scott







More information about the Qt-interest-old mailing list