ProjectExplorer: Fix build directory expansion

QDir::cleanPath() must be called on the expanded path, otherwise it
messes with the data. For instance, QDir::cleanPath("%{a:b}/..") yields
".".

Change-Id: If55b9c7a733097cb36f62fbdae49fe03b542fcdf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2019-02-07 12:32:46 +01:00
parent 8d4e550551
commit 8bc7e04012

View File

@@ -86,7 +86,7 @@ BuildConfiguration::BuildConfiguration(Target *target, Core::Id id)
Utils::FileName BuildConfiguration::buildDirectory() const
{
const QString path = macroExpander()->expand(QDir::cleanPath(environment().expandVariables(m_buildDirectory.toString())));
const QString path = QDir::cleanPath(macroExpander()->expand(environment().expandVariables(m_buildDirectory.toString())));
return Utils::FileName::fromString(QDir::cleanPath(QDir(target()->project()->projectDirectory().toString()).absoluteFilePath(path)));
}