Utils: Make FilePath::toString() output OS-independent again

Change-Id: Ica7c09ea39a38e3425b28c63b6001ad7ad641a4f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2022-09-16 10:29:51 +02:00
parent 2429232e72
commit 2f2e266fdf
4 changed files with 17 additions and 20 deletions

View File

@@ -186,10 +186,9 @@ QString FilePath::toString() const
if (m_scheme.isEmpty())
return m_path;
// FIXME: This OS-independent URL-style output
if (isRelativePath())
return specialPath(SpecialPathComponent::RootPath) + "/" + m_scheme + "/" + encodedHost() + "/./" + m_path;
return specialPath(SpecialPathComponent::RootPath) + "/" + m_scheme + "/" + encodedHost() + m_path;
return m_scheme + "://" + encodedHost() + "/./" + m_path;
return m_scheme + "://" + encodedHost() + m_path;
}
QString FilePath::toFSPathString() const