Review Request 111674: Don't open .desktop files with http:/https: urls in Dolphin
Frank Reininghaus
frank78ac at googlemail.com
Wed Jul 24 22:08:17 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111674/#review36466
-----------------------------------------------------------
Ship it!
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!
- Frank Reininghaus
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/20130724/7ba42f7c/attachment.htm>
More information about the kfm-devel
mailing list