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
This commit is contained in:
Emmanuel Pescosta 2013-07-26 15:05:40 +02:00
parent f2312c62a6
commit f14352f141

View file

@ -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;
}
}
}
}