summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brüning <michael.bruning@qt.io>2020-06-15 12:36:14 +0200
committerMichael Brüning <michael.bruning@qt.io>2020-06-20 16:10:27 +0200
commit1a9a4af388477efd9f7008d5c0bb74432c20279d (patch)
tree6e00c629b2f552a6386439fad8cce292ceb91481
parent4298385ec33d40001af8b2d04e896e6a332d33e8 (diff)
Only add file url if it references a local file
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ø <tor.arne.vestbo@qt.io>
-rw-r--r--src/gui/platform/darwin/qmacmime.mm3
1 files changed, 2 insertions, 1 deletions
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<QByteArray> 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;
}