Utils: Improve FilePath::toUrl for local cases

Change-Id: If1674f97eeeb91173dc2b482662228c1c3f0f332
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-01-23 18:03:57 +01:00
parent 64b5364cab
commit 34fd5b3ced

View File

@@ -261,6 +261,8 @@ QString FilePath::toFSPathString() const
QUrl FilePath::toUrl() const
{
if (!needsDevice())
return QUrl::fromLocalFile(toFSPathString());
QUrl url;
url.setScheme(scheme().toString());
url.setHost(host().toString());