[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:       Milian Wolff <mail () milianw ! de>
Date:       2011-10-27 22:41:43
Message-ID: 20646933.ZiQazERMCM () minime
[Download RAW message or body]

On Thursday 27 October 2011 23:35:15 Thiago Macieira wrote:
> On Thursday, 27 de October de 2011 23:17:49 Milian Wolff wrote:
> > On Thursday 27 October 2011 21:11:11 Thiago Macieira wrote:
> > > 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.
> > 
> > is there at least a qWarning emitted in such a case, so we can find these
> > problems with QT_FATAL_WARNINGS=1 ?
> 
> No, but there's something better:
> 
> #define QURL_NO_CAST_FROM_QSTRING

<snip>

ok cool. I'll add this to kdevelop then. is this new in 4.8 or should it break 
in 4.7 already if there are issues?

thanks
-- 
Milian Wolff
mail@milianw.de
http://milianw.de
[prev in list] [next in list] [prev in thread] [next in thread] 

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