Qt 4.8 QUrl.toLocalFile behavior change, impacts to KUrl (and friends)

Milian Wolff mail at milianw.de
Sat Oct 29 03:38:00 BST 2011

On Saturday 29 October 2011 01:05:18 Thiago Macieira wrote:
> On Friday, 28 de October de 2011 17:43:32 Kevin Kofler wrote:
> > Thiago Macieira wrote:
> > > Which is quite wrong already. From Qt 4.8 on, this returns empty in all
> > > cases, showing that you parsed the URL wrongly. It should be easier to
> > > spot where you made the mistake because you don't have to use
> > > specially-crafted filenames.
> > 
> > Such a change might make sense for 5.0, but not for 4.8!
> > 
> > Or if you really want to add the changed API to 4.x, you have to do it
> > with
> > a new name, deprecating (but not removing!) toLocalFile.
> Let's just say I disagree.
> This change was for 4.7, but it was reverted and added to 4.8, giving you
> well over ONE YEAR to adapt.

Could someone maybe explain a few points on this issue for me?

1) When does it manifest? Apparently when using QUrl("...") directly, if I'm 
not mistaken. But what if we use KUrl?

2) Is the -D... define to catch this problem at compile time already supported 
in Qt 4.7?

I ask, because both KDevplatform and KDevelop seem to compile just fine with 
the additional strict define...

Milian Wolff
mail at milianw.de

More information about the kde-core-devel mailing list