Review Request 111674: Don't open .desktop files with http:/https: urls in Dolphin
Emmanuel Pescosta
emmanuelpescosta099 at gmail.com
Fri Jul 26 14:05:02 BST 2013
> On July 24, 2013, 9:08 p.m., Frank Reininghaus wrote:
> > Thanks for the patch! Looks good. Just one little thing: rather than adding a new "if (item.isDesktopFile()) {...}" block, we can just re-use the one that is a little further down in the function and modify it like this:
> >
> > if (mimetype == QLatin1String("application/x-desktop")) {
> > // Redirect to the URL in Type=Link desktop files, unless it is a http(s) URL.
> > KDesktopFile desktopFile(url.toLocalFile());
> > if (desktopFile.hasLinkType()) {
> > const QString linkUrl = desktopFile.readUrl();
> > if (!linkUrl.startsWith(QLatin1String("http"))) {
> > return linkUrl;
> > }
> > }
> > }
> >
> > I think that this makes the function a bit easier to understand. If you agree, just push this version. Thanks for your work!
Thanks for the hint! Much better code :)
- Emmanuel
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111674/#review36466
-----------------------------------------------------------
On July 24, 2013, 8:31 p.m., Emmanuel Pescosta wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111674/
> -----------------------------------------------------------
>
> (Updated July 24, 2013, 8:31 p.m.)
>
>
> Review request for Dolphin.
>
>
> Description
> -------
>
> Don't open .desktop files with http:/https: urls in Dolphin, open these urls in the default browser instead.
>
>
> This addresses bugs 283475 and 318217.
> http://bugs.kde.org/show_bug.cgi?id=283475
> http://bugs.kde.org/show_bug.cgi?id=318217
>
>
> Diffs
> -----
>
> dolphin/src/views/dolphinview.cpp d54a101
>
> Diff: http://git.reviewboard.kde.org/r/111674/diff/
>
>
> Testing
> -------
>
> Works for me.
>
>
> Thanks,
>
> Emmanuel Pescosta
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130726/98611050/attachment.htm>
More information about the kfm-devel
mailing list