Qmake: Move context build action handling to build system

Among others, this removes the wart introduced in 4d3d2d0dfb.

Change-Id: Iafa63f6e4cca327a1d1dd6a8bbcfaa10032327db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-03-20 15:56:43 +01:00
parent 1194340b85
commit 2444595fbc
5 changed files with 60 additions and 94 deletions

View File

@@ -1358,6 +1358,34 @@ QVariant QmakeBuildSystem::additionalData(Core::Id id) const
return BuildSystem::additionalData(id);
}
void QmakeBuildSystem::buildHelper(Action action, bool isFileBuild, QmakeProFileNode *profile,
FileNode *buildableFile)
{
auto bc = qmakeBuildConfiguration();
if (!profile || !buildableFile)
isFileBuild = false;
if (profile) {
if (profile != project()->rootProjectNode() || isFileBuild)
bc->setSubNodeBuild(profile->proFileNode());
}
if (isFileBuild)
bc->setFileNodeBuild(buildableFile);
if (ProjectExplorerPlugin::saveModifiedFiles()) {
if (action == BUILD)
BuildManager::buildList(bc->buildSteps());
else if (action == CLEAN)
BuildManager::buildList(bc->cleanSteps());
else if (action == REBUILD)
BuildManager::buildLists({bc->cleanSteps(), bc->buildSteps()});
}
bc->setSubNodeBuild(nullptr);
bc->setFileNodeBuild(nullptr);
}
} // QmakeProjectManager
#include "qmakeproject.moc"