mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
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:
parent
55a989626d
commit
32bf4827c4
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue