forked from qt-creator/qt-creator
Utils: Introduce FilePath::normalizePathName()
... as wrapper around FileUtils::normalizePathName, and use it in some places. Change-Id: I42792e1f175b8119c8db930eae80a9f822ac70fa Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -822,6 +822,14 @@ FilePath FilePath::absoluteFilePath(const FilePath &tail) const
|
||||
return tail;
|
||||
}
|
||||
|
||||
FilePath FilePath::normalizePathName() const
|
||||
{
|
||||
FilePath result = *this;
|
||||
if (!needsDevice()) // FIXME: Assumes no remote Windows and Mac for now.
|
||||
result.m_data = FileUtils::normalizePathName(result.m_data);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Constructs a FilePath from \a filename
|
||||
/// \a filename is not checked for validity.
|
||||
FilePath FilePath::fromString(const QString &filepath)
|
||||
|
||||
Reference in New Issue
Block a user