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
|
||||
{
|
||||
if (!needsDevice())
|
||||
return QUrl::fromLocalFile(toFSPathString());
|
||||
QUrl url;
|
||||
url.setScheme(scheme().toString());
|
||||
url.setHost(host().toString());
|
||||
|
Reference in New Issue
Block a user