diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index dadf791a61e..e17f140868d 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -819,15 +819,6 @@ FilePath FilePath::symLinkTarget() const return FilePath::fromString(info.symLinkTarget()); } -FilePath FilePath::mapToGlobalPath() const -{ - if (needsDevice()) { - QTC_ASSERT(s_deviceHooks.mapToGlobalPath, return {}); - return s_deviceHooks.mapToGlobalPath(*this); - } - return *this; -} - QString FilePath::mapToDevicePath() const { if (needsDevice()) { @@ -1182,11 +1173,11 @@ QString FilePath::calcRelativePath(const QString &absolutePath, const QString &a */ FilePath FilePath::onDevice(const FilePath &deviceTemplate) const { - if (!deviceTemplate.needsDevice()) - return mapToGlobalPath(); const bool sameDevice = m_scheme == deviceTemplate.m_scheme && m_host == deviceTemplate.m_host; + if (sameDevice) + return *this; // TODO: converting paths between different non local devices is still unsupported - QTC_CHECK(!needsDevice() || sameDevice); + QTC_CHECK(!needsDevice()); FilePath res; res.m_scheme = deviceTemplate.m_scheme; res.m_host = deviceTemplate.m_host; diff --git a/src/libs/utils/filepath.h b/src/libs/utils/filepath.h index da5ca921bbc..7cb5b9f2b84 100644 --- a/src/libs/utils/filepath.h +++ b/src/libs/utils/filepath.h @@ -162,8 +162,6 @@ public: QDir::Filters filters = QDir::NoFilter, QDirIterator::IteratorFlags flags = QDirIterator::NoIteratorFlags) const; - [[nodiscard]] FilePath mapToGlobalPath() const; - // makes sure that capitalization of directories is canonical // on Windows and macOS. This is rarely needed. [[nodiscard]] FilePath normalizedPathName() const;