forked from qt-creator/qt-creator
Utils: Introduce a FilePath::absolutePath() function
... and start using it. Change-Id: I44c74005a4deee72d0332106a4ce3582e0b66191 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -800,6 +800,13 @@ FilePath FilePath::parentDir() const
|
||||
return FilePath::fromString(parent);
|
||||
}
|
||||
|
||||
FilePath FilePath::absolutePath() const
|
||||
{
|
||||
FilePath result = *this;
|
||||
result.m_data = QFileInfo(m_data).absolutePath();
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Constructs a FilePath from \a filename
|
||||
/// \a filename is not checked for validity.
|
||||
FilePath FilePath::fromString(const QString &filename)
|
||||
|
||||
Reference in New Issue
Block a user