From 664be8ed48db0062813dd8d5a0bb83c71067aced Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 5 Oct 2023 10:04:36 +0200 Subject: [PATCH] Utils: Remove an QTC_ASSERT In principle that'd be fine there, but the host equality is too strong in some cases (isSameDevice should help), but it also still gets fed more or less random content to create display names. Finding the exact condition is tricky, and the remaining path is good enough. Change-Id: I4ec29c2f259a7b761d00012bcd9a6d69a057043c Reviewed-by: Marcus Tillmanns --- src/libs/utils/filepath.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index 26d6d667f90..1cd57e581b6 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -1554,11 +1554,6 @@ QString FilePath::calcRelativePath(const QString &absolutePath, const QString &a */ FilePath FilePath::withNewMappedPath(const FilePath &newPath) const { - const bool sameDevice = newPath.scheme() == scheme() && newPath.host() == host(); - if (sameDevice) - return newPath; - // TODO: converting paths between different non local devices is still unsupported - QTC_CHECK(!newPath.needsDevice() || !needsDevice()); FilePath res; res.setParts(scheme(), host(), fileAccess()->mapToDevicePath(newPath.path())); return res;