forked from qt-creator/qt-creator
Utils: Introduce FilePath::mapTo{Device,Global}Path
Re-directing via IDevice::mapTo{Device,Global}Path
Change-Id: Ica957839479967790bbd93e90eced66aa0b122a8
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -819,6 +819,24 @@ 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()) {
|
||||
QTC_ASSERT(s_deviceHooks.mapToDevicePath, return {});
|
||||
return s_deviceHooks.mapToDevicePath(*this);
|
||||
}
|
||||
return m_data;
|
||||
}
|
||||
|
||||
FilePath FilePath::withExecutableSuffix() const
|
||||
{
|
||||
FilePath res = *this;
|
||||
|
||||
Reference in New Issue
Block a user