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

2011-10-28 Thread Albert Astals Cid
A Divendres, 28 d'octubre de 2011, Thiago Macieira vàreu escriure:
 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.

Right, it was wrong if it had to accept user input but for internal hardcoded 
paths, it worked and now it does not.

Albert

 
 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


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

2011-10-28 Thread Kevin Kofler
Albert Astals Cid wrote:
 Personally i find it another joke in the history of Qt, saying you
 maintain API and ABI (that you do) but then making functions behave
 totally different from one version to another is just plain useless.

+1

You just CANNOT change the behavior of an existing function in such a way.

Kevin Kofler



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

2011-10-27 Thread Albert Astals Cid
A Dijous, 27 d'octubre de 2011, Thiago Macieira vàreu escriure:
 On Thursday, 27 de October de 2011 13:32:51 Rex Dieter wrote:
  See also,
  http://bugs.kde.org/285028
  ( and https://bugreports.qt.nokia.com/browse/QTBUG-22382 )
  
  In Qt 4.8, QUrl.toLocalFile now seems, by design, to return NULL for
  urls
  lacking any scheme.  Discovered this the hard way figuring out why all
  my
  audio knotifications were quiet.  Since audio event sources are simple
  filenames, e.g. KDE-K3B-Finish-Success.ogg, and
  QString soundFile = soundFileURL.toLocalFile();
  no longer works.
  
  Any suggestions or advice on how best to deal with this?
 
 As we discussed on IRC, any string source must be properly labelled whether
 they are a URL or they are a local file. They cannot be both.

Personally i find it another joke in the history of Qt, saying you maintain 
API and ABI (that you do) but then making functions behave totally different 
from one version to another is just plain useless.

Albert

 
 --
 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


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

2011-10-27 Thread Albert Astals Cid
A Dijous, 27 d'octubre de 2011, Thiago Macieira vàreu escriure:
 On Thursday, 27 de October de 2011 22:31:15 Albert Astals Cid wrote:
  Personally i find it another joke in the history of Qt, saying you
  maintain API and ABI (that you do) but then making functions behave
  totally different from one version to another is just plain useless.
 
 Right. So we should just not release updates, because fixing bugs changes
 behaviour.

This is not what i meant, and you know it. But as it is obvious you do not 
want to have a constructive discussion, let's end it here.

Albert

 
 Good thinking. Call me when you get to make such decisions.
 
 --
 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