diff options
Diffstat (limited to 'src/libs/utils')
-rw-r--r-- | src/libs/utils/fileutils.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index a08f7ba98d6..e1dfaea69db 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -954,7 +954,7 @@ bool FilePath::needsDevice() const /// \returns \a FilePath with the last segment removed. FilePath FilePath::parentDir() const { - const QString basePath = toString(); + const QString basePath = path(); if (basePath.isEmpty()) return FilePath(); @@ -966,7 +966,9 @@ FilePath FilePath::parentDir() const const QString parent = QDir::cleanPath(path); QTC_ASSERT(parent != path, return FilePath()); - return FilePath::fromString(parent); + FilePath result = *this; + result.setPath(parent); + return result; } FilePath FilePath::absolutePath() const |