ProjectExplorer: Resolve any CurrentProject:<foo> in default build path

If ProjectMacroExpander doesn't resolve it we fall back to the generic
ProjectExplorer resolution, which is likely to pick the wrong project.

Task-number: QTCREATORBUG-16724
Change-Id: I201b722c5fe184905f744a1f344ec46941f92ae3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Ulf Hermann
2016-08-08 18:35:32 +02:00
parent 9142934d8e
commit bac2d18405
6 changed files with 11 additions and 7 deletions

View File

@@ -78,7 +78,7 @@ QString QmakeBuildConfiguration::shadowBuildDirectory(const QString &proFilePath
return QString();
const QString projectName = QFileInfo(proFilePath).completeBaseName();
ProjectMacroExpander expander(projectName, k, suffix, buildType);
ProjectMacroExpander expander(proFilePath, projectName, k, suffix, buildType);
QString projectDir = Project::projectDirectory(FileName::fromString(proFilePath)).toString();
QString buildPath = expander.expand(Core::DocumentManager::buildDirectory());
return FileUtils::resolvePath(projectDir, buildPath);