From 1a9a4af388477efd9f7008d5c0bb74432c20279d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Mon, 15 Jun 2020 12:36:14 +0200 Subject: Only add file url if it references a local file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remote URLs were converted to local file urls and converted to relative paths, which led to bugs when copying URLs from e.g. the web sites and pasting them into the command line. Original patch by Allan Sandfeld Jensen. Task-number: QTBUG-80243 Change-Id: I2cd41635b34b2ead424441719795705ef19d37f2 Reviewed-by: Tor Arne Vestbø --- src/gui/platform/darwin/qmacmime.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/platform/darwin/qmacmime.mm b/src/gui/platform/darwin/qmacmime.mm index f66580551a..6e588f2ca0 100644 --- a/src/gui/platform/darwin/qmacmime.mm +++ b/src/gui/platform/darwin/qmacmime.mm @@ -664,7 +664,8 @@ QList QMacPasteboardMimeFileUri::convertFromMime(const QString &mime url.setHost(QLatin1String("localhost")); url.setPath(url.path().normalized(QString::NormalizationForm_D)); } - ret.append(url.toEncoded()); + if (url.isLocalFile()) + ret.append(url.toEncoded()); } return ret; } -- cgit v1.2.3