[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Qt 4.8 QUrl.toLocalFile behavior change,
From:       Thiago Macieira <thiago () kde ! org>
Date:       2011-10-28 9:22:07
Message-ID: 3004802.DSRcriDm94 () doriath
[Download RAW message or body]


On Friday, 28 de October de 2011 10:41:36 Sebastian Trüg wrote:
> > So, to be honest, the bug already existed in your code if you're finding 
> > these problems now. I just made it blatantly clear, and it's been there
> > for a  year for people to see.
> >
> > 
> >
> > I'm also calling right now KUrl's fromPathOrUrl a fatally flawed design.
> 
> Be that as it may but the fact remains that KDE potentially does not
> work with Qt 4.8. Is that really a risk worth taking? I am all for fixed
> semantics in the methods but this seems like a problematic case.

Let me repeat: the problem already existed. This just made the broken code 
more evident. You should fix it ANYWAY.

If you had a file path of:
	"/tmp/Who let the dogs out?.mp3"
or	"/tmp/Mambo #5.mp3"

In Qt 4.7, toLocalFile on those URLs above would return:

	"/tmp/Who let the dogs out"
and	"/tmp/Mambo "

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.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic