forked from qt-creator/qt-creator
Utils: Improve FilePath::toUrl for local cases
Change-Id: If1674f97eeeb91173dc2b482662228c1c3f0f332 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -261,6 +261,8 @@ QString FilePath::toFSPathString() const
|
|||||||
|
|
||||||
QUrl FilePath::toUrl() const
|
QUrl FilePath::toUrl() const
|
||||||
{
|
{
|
||||||
|
if (!needsDevice())
|
||||||
|
return QUrl::fromLocalFile(toFSPathString());
|
||||||
QUrl url;
|
QUrl url;
|
||||||
url.setScheme(scheme().toString());
|
url.setScheme(scheme().toString());
|
||||||
url.setHost(host().toString());
|
url.setHost(host().toString());
|
||||||
|
Reference in New Issue
Block a user