mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +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
f2312c62a6
commit
f14352f141
1 changed files with 5 additions and 2 deletions
|
@ -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