forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user