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>
This commit is contained in:
Michael Brüning 2020-06-15 12:36:14 +02:00
parent 4298385ec3
commit 1a9a4af388

View File

@ -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;
}