forked from qt-creator/qt-creator
Utils: Sanitize FilePath::onDevice()
It's one entry in the FilePath world, so it should start with a QString. Change-Id: Ib2693f52d56103a4c37ba7361b191c2a5c2a72f8 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -551,11 +551,6 @@ FilePath FilePath::symLinkTarget() const
|
||||
return fileAccess()->symLinkTarget(*this);
|
||||
}
|
||||
|
||||
QString FilePath::mapToDevicePath() const
|
||||
{
|
||||
return fileAccess()->mapToDevicePath(*this);
|
||||
}
|
||||
|
||||
FilePath FilePath::withExecutableSuffix() const
|
||||
{
|
||||
return withNewPath(OsSpecificAspects::withExecutableSuffix(osType(), path()));
|
||||
@@ -1088,10 +1083,9 @@ FilePath FilePath::onDevice(const FilePath &deviceTemplate) const
|
||||
return *this;
|
||||
// TODO: converting paths between different non local devices is still unsupported
|
||||
QTC_CHECK(!needsDevice());
|
||||
FilePath res;
|
||||
res.setParts(deviceTemplate.scheme(), deviceTemplate.host(), path());
|
||||
res.setPath(res.mapToDevicePath());
|
||||
return res;
|
||||
return fromParts(deviceTemplate.scheme(),
|
||||
deviceTemplate.host(),
|
||||
deviceTemplate.fileAccess()->mapToDevicePath(path()));
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user