diff options
| author | Emmanuel Pescosta <[email protected]> | 2013-07-26 15:05:40 +0200 |
|---|---|---|
| committer | Emmanuel Pescosta <[email protected]> | 2013-07-26 15:05:40 +0200 |
| commit | 32bf4827c45faf432593eb03432118e5436dded5 (patch) | |
| tree | e4f5fd8df20823468d9ceacf648a732e39c36d62 /src/views/dolphinview.cpp | |
| parent | 55a989626d1285590ee7906638215b7a63812e23 (diff) | |
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
Diffstat (limited to 'src/views/dolphinview.cpp')
| -rw-r--r-- | src/views/dolphinview.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index d54a101d8..bd311e4d3 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -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; + } } } } |
