Change IBuildStepFactory::canCreate to take a BuildConfiguration

instead of a Project. Since BuildSteps "should" only care about the
BuildConfiguration not the Project. (Not 100% doable, but still.)
This commit is contained in:
dt
2009-11-25 19:39:52 +01:00
parent a312206306
commit a7a7e4d002
13 changed files with 17 additions and 19 deletions

View File

@@ -47,7 +47,6 @@ using namespace ProjectExplorer::Internal;
BuildStepsPage::BuildStepsPage(Project *project, bool clean) :
BuildConfigWidget(),
m_pro(project),
m_clean(clean)
{
m_vbox = new QVBoxLayout(this);
@@ -144,7 +143,7 @@ void BuildStepsPage::updateAddBuildStepMenu()
//Build up a list of possible steps and save map the display names to the (internal) name and factories.
QList<IBuildStepFactory *> factories = ExtensionSystem::PluginManager::instance()->getObjects<IBuildStepFactory>();
foreach (IBuildStepFactory * factory, factories) {
QStringList names = factory->canCreateForProject(m_pro);
QStringList names = factory->canCreateForProject(m_configuration);
foreach (const QString &name, names) {
map.insert(factory->displayNameForName(name), QPair<QString, IBuildStepFactory *>(name, factory));
}