Review Request: Remove QFSFileEngine useage from Phonon five.
Jon Severinsson
jon at severinsson.net
Sun Oct 21 13:22:05 BST 2012
> On Oct. 21, 2012, 10:46 a.m., David Faure wrote:
> > Urgh, too much detailed magic.
> >
> > Either the input string is always a local path, and use fromLocalFile. Or it's always a URL, and use QUrl(QString). Or it could be either one, and then QUrl::fromUserInput(QString) is what you're looking for.
>
> Jon Severinsson wrote:
> Oh, it is uggly, but removing the ugglyness merely moves it to the user.
>
> As for fromUserInput, QUrl::fromUserInput("foo") will result in "http://foo", while it supposed to be the file "foo" in cwd, so using it is a no-go.
>
> David Faure wrote:
> Oh. Good point. In KDE I'm always thinking "full path or URL", never "relative path". Qt likes to support relative paths, but IMHO they are very rarely useful in GUI programs (only in e.g. a file dialog, or possibly unit tests). Or command line.
> A "resolve this string as a relative path, full path, or full URL" is missing indeed. We have such logic in KCmdLineArgs, you need it here, etc.
> But IIRC thiago pointed out that it can be ambiguous in some cases... I forgot which, though.
>
well, relqtive path, full path, or full url is three lines of code, most of the uggluness comes from qrc support. The ambiguitiy is a relative path whose first component end in a colon. This dontrealy handle that case, if it ends up a valid url, it is treated as an url, ese it is treated as a relative path. I guess one could check if it is an existing local file anduse that then.
- Jon
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106974/#review20619
-----------------------------------------------------------
On Oct. 21, 2012, 9:59 a.m., Jon Severinsson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106974/
> -----------------------------------------------------------
>
> (Updated Oct. 21, 2012, 9:59 a.m.)
>
>
> Review request for KDE Frameworks and Phonon.
>
>
> Description
> -------
>
> QFSFileEngine has been removed from Qt5, so rip it out of phonon/mediasource.cpp. Any pointers to a propper fix would be welcome.
>
>
> Diffs
> -----
>
> 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/20121021/84eb7944/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