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

Albert Astals Cid aacid at kde.org
Thu Oct 27 21:31:15 BST 2011


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




More information about the kde-core-devel mailing list