Review Request: Rework MediaSource(const QString &filename) constructor in phonon five.

David Faure faure at kde.org
Wed Oct 31 16:39:46 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106974/#review21248
-----------------------------------------------------------



phonon/mediasource.cpp
<http://git.reviewboard.kde.org/r/106974/#comment16583>

    Technically, this is wrong. If the filename contains a '#' or a '?', it needs to be escaped when constructing a URL from the filename, otherwise it will be parsed as a fragment or query separator. This is what QUrl::fromLocalFile does for local files, but here you'd have to use something like:
     d->url.setScheme("qrc"); 
     d->url.setPath(filename);
    


- David Faure


On Oct. 31, 2012, 4:21 p.m., Jon Severinsson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106974/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2012, 4:21 p.m.)
> 
> 
> Review request for KDE Frameworks and Phonon.
> 
> 
> Description
> -------
> 
> QFSFileEngine has been removed from Qt5, so the MediaSource(const QString &filename) constructor has to be reworked to not need it.  The only behaviourial changes from the original code are that non-local absolute file paths (eg smb share file paths such as "//hostname/share/path") and "qrc:///" URLs actually works.
> 
> I have also added qrc support to the QUrl constructor, and deprecated the QString constructor in favour of it.
> 
> 
> Diffs
> -----
> 
>   phonon/mediasource.h 5374f00 
>   phonon/mediasource.cpp 9e35094 
> 
> Diff: http://git.reviewboard.kde.org/r/106974/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jon Severinsson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20121031/b351e741/attachment.htm>
-------------- next part --------------
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel at kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


More information about the kde-multimedia mailing list