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

Rex Dieter rdieter at math.unl.edu
Thu Oct 27 19:32:51 BST 2011


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?

-- rex





More information about the kde-core-devel mailing list