Commit f14352f1 authored by Emmanuel Pescosta's avatar Emmanuel Pescosta
Browse files

Don't open .desktop files with http:/https: urls in Dolphin,

open these urls in the default browser instead.

BUG: 283475
BUG: 318217
FIXED-IN: 4.11.0
REVIEW: 111674
parent f2312c62
......@@ -1254,10 +1254,13 @@ KUrl DolphinView::openItemAsFolderUrl(const KFileItem& item, const bool browseTh
}
if (mimetype == QLatin1String("application/x-desktop")) {
// Redirect to the URL in Type=Link desktop files
// Redirect to the URL in Type=Link desktop files, unless it is a http(s) URL.
KDesktopFile desktopFile(url.toLocalFile());
if (desktopFile.hasLinkType()) {
return desktopFile.readUrl();
const QString linkUrl = desktopFile.readUrl();
if (!linkUrl.startsWith(QLatin1String("http"))) {
return linkUrl;
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment