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
|
FilePath FilePath::onDevice(const FilePath &deviceTemplate) const
|
||||||
{
|
{
|
||||||
|
isSameDevice(deviceTemplate);
|
||||||
const bool sameDevice = scheme() == deviceTemplate.scheme() && host() == deviceTemplate.host();
|
const bool sameDevice = scheme() == deviceTemplate.scheme() && host() == deviceTemplate.host();
|
||||||
if (sameDevice)
|
if (sameDevice)
|
||||||
return *this;
|
return *this;
|
||||||
|
|||||||
@@ -150,4 +150,11 @@ Environment DesktopDevice::systemEnvironment() const
|
|||||||
return Environment::systemEnvironment();
|
return Environment::systemEnvironment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FilePath DesktopDevice::rootPath() const
|
||||||
|
{
|
||||||
|
if (id() == DESKTOP_DEVICE_ID)
|
||||||
|
return FilePath::fromParts({}, {}, QDir::rootPath());
|
||||||
|
return IDevice::rootPath();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ public:
|
|||||||
Utils::Environment systemEnvironment() const override;
|
Utils::Environment systemEnvironment() const override;
|
||||||
Utils::FilePath mapToGlobalPath(const Utils::FilePath &pathOnDevice) const override;
|
Utils::FilePath mapToGlobalPath(const Utils::FilePath &pathOnDevice) const override;
|
||||||
|
|
||||||
|
Utils::FilePath rootPath() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DesktopDevice();
|
DesktopDevice();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user