Add BuildConfiguration classes

Each project has it's own BuildConfiguarion * classes, they'll get a
decent type safe interface and the setValue/value stuff will be removed.
This commit is contained in:
dt
2009-11-23 12:11:48 +01:00
parent 4ef64b8dc6
commit ae633c1956
21 changed files with 348 additions and 31 deletions

View File

@@ -30,6 +30,7 @@
#include "genericproject.h"
#include "genericprojectconstants.h"
#include "genericmakestep.h"
#include "genericbuildconfiguration.h"
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorerconstants.h>
@@ -145,7 +146,7 @@ bool GenericBuildConfigurationFactory::create(const QString &type) const
&ok);
if (!ok || buildConfigurationName.isEmpty())
return false;
BuildConfiguration *bc = new BuildConfiguration(buildConfigurationName);
GenericBuildConfiguration *bc = new GenericBuildConfiguration(buildConfigurationName);
m_project->addBuildConfiguration(bc); // also makes the name unique...
GenericMakeStep *makeStep = new GenericMakeStep(m_project, bc);
@@ -154,6 +155,14 @@ bool GenericBuildConfigurationFactory::create(const QString &type) const
return true;
}
bool GenericBuildConfigurationFactory::clone(const QString &name, BuildConfiguration *source) const
{
// TODO
GenericBuildConfiguration *bc = new GenericBuildConfiguration(name, static_cast<GenericBuildConfiguration *>(source));
m_project->addBuildConfiguration(bc);
return true;
}
////////////////////////////////////////////////////////////////////////////////////
// GenericProject
////////////////////////////////////////////////////////////////////////////////////
@@ -518,7 +527,7 @@ bool GenericProject::restoreSettingsImpl(ProjectExplorer::PersistentSettingsRead
Project::restoreSettingsImpl(reader);
if (buildConfigurations().isEmpty()) {
ProjectExplorer::BuildConfiguration *bc = new BuildConfiguration("all");
GenericBuildConfiguration *bc = new GenericBuildConfiguration("all");
addBuildConfiguration(bc);
GenericMakeStep *makeStep = new GenericMakeStep(this, bc);