Add Build to the right click menu of sub projects for Qt4 Projects

They do what you expect them to do, that is build only a subtree.
The implementation is a little bit strange. We temporarly set the sub
node to be built on the BuildConfiguration, enqueue that
BuildConfiguration (which calls BuildStep::init()), and then reset that
temporary value.

A more general way would be to have the ability to extend
BuildConfiguration::buildProject() in a way that additional data can be
passed to the BuildSteps.

Task-Nr: QTCREATOR-5
Task-Nr: QTCREATORBUG-44
This commit is contained in:
dt
2010-01-13 18:00:02 +01:00
parent 407b7f1ff0
commit fb3ae97df3
9 changed files with 100 additions and 14 deletions

View File

@@ -104,7 +104,11 @@ bool MakeStep::init()
Environment environment = bc->environment();
setEnvironment(environment);
QString workingDirectory = bc->buildDirectory();
QString workingDirectory;
if (bc->subNodeBuild())
workingDirectory = bc->subNodeBuild()->buildDir();
else
workingDirectory = bc->buildDirectory();
setWorkingDirectory(workingDirectory);
QString makeCmd = bc->makeCommand();