From 32bf4827c45faf432593eb03432118e5436dded5 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Fri, 26 Jul 2013 15:05:40 +0200 Subject: [PATCH] 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 --- src/views/dolphinview.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index d54a101d84..bd311e4d37 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; + } } } }