forked from qt-creator/qt-creator
ProjectExplorer: create a root path without scheme for host device
Change-Id: I966db6378dca533c73635803fb177d31b2c625ac Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -1083,6 +1083,7 @@ QString FilePath::calcRelativePath(const QString &absolutePath, const QString &a
|
||||
*/
|
||||
FilePath FilePath::onDevice(const FilePath &deviceTemplate) const
|
||||
{
|
||||
isSameDevice(deviceTemplate);
|
||||
const bool sameDevice = scheme() == deviceTemplate.scheme() && host() == deviceTemplate.host();
|
||||
if (sameDevice)
|
||||
return *this;
|
||||
|
||||
@@ -150,4 +150,11 @@ Environment DesktopDevice::systemEnvironment() const
|
||||
return Environment::systemEnvironment();
|
||||
}
|
||||
|
||||
FilePath DesktopDevice::rootPath() const
|
||||
{
|
||||
if (id() == DESKTOP_DEVICE_ID)
|
||||
return FilePath::fromParts({}, {}, QDir::rootPath());
|
||||
return IDevice::rootPath();
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -36,6 +36,8 @@ public:
|
||||
Utils::Environment systemEnvironment() const override;
|
||||
Utils::FilePath mapToGlobalPath(const Utils::FilePath &pathOnDevice) const override;
|
||||
|
||||
Utils::FilePath rootPath() const override;
|
||||
|
||||
protected:
|
||||
DesktopDevice();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user