forked from qt-creator/qt-creator
Utils: Make FilePath::toFSPathString a full copy of toString
Changing the toString() to prepend system-specific prefixes to cater for the remote filesystem model handling had unintended sideeffects. This here is the first step to split both paths. Change-Id: I66cdd9a87802408e2ba95c2e29b9d7cce7fe2553 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -186,6 +186,7 @@ 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;
|
||||
@@ -193,8 +194,12 @@ QString FilePath::toString() const
|
||||
|
||||
QString FilePath::toFSPathString() const
|
||||
{
|
||||
// TODO ...
|
||||
return toString();
|
||||
if (m_scheme.isEmpty())
|
||||
return m_path;
|
||||
|
||||
if (isRelativePath())
|
||||
return specialPath(SpecialPathComponent::RootPath) + "/" + m_scheme + "/" + encodedHost() + "/./" + m_path;
|
||||
return specialPath(SpecialPathComponent::RootPath) + "/" + m_scheme + "/" + encodedHost() + m_path;
|
||||
}
|
||||
|
||||
QUrl FilePath::toUrl() const
|
||||
|
||||
Reference in New Issue
Block a user