forked from qt-creator/qt-creator
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:
@@ -72,7 +72,10 @@ QStringList QMakeStep::allArguments()
|
||||
QStringList additonalArguments = m_userArgs;
|
||||
Qt4BuildConfiguration *bc = qt4BuildConfiguration();
|
||||
QStringList arguments;
|
||||
arguments << buildConfiguration()->project()->file()->fileName();
|
||||
if (bc->subNodeBuild())
|
||||
arguments << bc->subNodeBuild()->path();
|
||||
else
|
||||
arguments << buildConfiguration()->project()->file()->fileName();
|
||||
arguments << "-r";
|
||||
|
||||
if (!additonalArguments.contains("-spec"))
|
||||
@@ -120,8 +123,13 @@ bool QMakeStep::init()
|
||||
}
|
||||
|
||||
QStringList args = allArguments();
|
||||
QString workingDirectory = qt4bc->buildDirectory();
|
||||
QString workingDirectory;
|
||||
if (qt4bc->subNodeBuild())
|
||||
workingDirectory = qt4bc->subNodeBuild()->buildDir();
|
||||
else
|
||||
workingDirectory = qt4bc->buildDirectory();
|
||||
|
||||
qDebug()<<"using working directory"<<workingDirectory<<"and args"<<args;
|
||||
QString program = qtVersion->qmakeCommand();
|
||||
|
||||
// Check whether we need to run qmake
|
||||
|
||||
Reference in New Issue
Block a user