[Qt-interest] anyone know why QDir::mkpath() isn't static?
Paul Miller
paul at fxtech.com
Tue Apr 12 18:44:39 CEST 2011
On 4/12/2011 11:26 AM, Thiago Macieira wrote:
> 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.
That is interesting. I've also noted quite a bit of redundancy between
those classes. I don't use them a ton, much less than the UI classes,
but I use them enough to notice when things feel wrong or at least weird.
> 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?
As someone who happily ported a 100,000+ line program from Qt 3 to 4
without complaint, I could see doing it again for a 4 to 5 transition,
as long as "equivalent" features existed in v5. Though your
binary/source compatibility is hugely laudable, there are times where
it's best to throw the crufty stuff out (or stick it in a compatibility
library like you did with qt3support) in favor of the clean new way.
More information about the Qt-interest-old
mailing list