forked from qt-creator/qt-creator
Utils: Introduce a FilePath::cleanPath
Change-Id: I8ce1aaf3e6b118f28414e7a52a1b310dd81e75e3 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -392,6 +392,13 @@ FilePath FilePath::resolveSymlinkTarget() const
|
||||
return *this;
|
||||
}
|
||||
|
||||
FilePath FilePath::cleanPath() const
|
||||
{
|
||||
FilePath result = *this;
|
||||
result.setPath(QDir::cleanPath(result.path()));
|
||||
return result;
|
||||
}
|
||||
|
||||
FilePath FileUtils::commonPath(const FilePath &oldCommonPath, const FilePath &filePath)
|
||||
{
|
||||
FilePath newCommonPath = oldCommonPath;
|
||||
|
@@ -163,6 +163,7 @@ public:
|
||||
FilePath stringAppended(const QString &str) const;
|
||||
FilePath resolvePath(const QString &fileName) const;
|
||||
FilePath resolveSymlinkTarget() const;
|
||||
FilePath cleanPath() const;
|
||||
|
||||
FilePath canonicalPath() const;
|
||||
|
||||
|
Reference in New Issue
Block a user