ProjectExplorer: Fix build dir path

Clean path on a remote path like docker://foo removes double slashes and
results in docker:/foo. Which can not parsed as a remote path by
FilePath::fromString

Change-Id: Ia7ed6ae63e609d2cb5fc2e9bc886c6fb721b4ccd
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-09-09 09:57:40 +02:00
parent 6786d585e0
commit 8edbba43aa

View File

@@ -247,11 +247,13 @@ BuildConfiguration::~BuildConfiguration()
FilePath BuildConfiguration::buildDirectory() const
{
QString path = environment().expandVariables(d->m_buildDirectoryAspect->value().trimmed());
path = QDir::cleanPath(macroExpander()->expand(path));
FilePath path = FilePath::fromString(
environment().expandVariables(d->m_buildDirectoryAspect->value().trimmed()));
path = macroExpander()->expand(path);
path = path.cleanPath();
const FilePath projectDir = target()->project()->projectDirectory();
const FilePath buildDir = projectDir.resolvePath(FilePath::fromString(path));
const FilePath buildDir = projectDir.resolvePath(path);
return mapFromBuildDeviceToGlobalPath(buildDir);
}