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 <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2023-10-05 10:04:36 +02:00
parent a1ac447d90
commit 664be8ed48

View File

@@ -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;