Skip to content
Snippets Groups Projects
Commit 9c4c7248 authored by dt's avatar dt
Browse files

Update on BuildConfiguration::displayNameChanged()

On the project page
parent 4b261a17
No related branches found
No related tags found
No related merge requests found
...@@ -168,6 +168,17 @@ void BuildSettingsWidget::setupUi() ...@@ -168,6 +168,17 @@ void BuildSettingsWidget::setupUi()
connect(m_project, SIGNAL(activeBuildConfigurationChanged()), connect(m_project, SIGNAL(activeBuildConfigurationChanged()),
this, SLOT(checkMakeActiveLabel())); this, SLOT(checkMakeActiveLabel()));
connect(m_project, SIGNAL(addedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(addedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
connect(m_project, SIGNAL(removedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(removedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
foreach (BuildConfiguration *bc, m_project->buildConfigurations()) {
connect(bc, SIGNAL(displayNameChanged()),
this, SLOT(buildConfigurationDisplayNameChanged()));
}
if (m_project->buildConfigurationFactory()) if (m_project->buildConfigurationFactory())
connect(m_project->buildConfigurationFactory(), SIGNAL(availableCreationIdsChanged()), SLOT(updateAddButtonMenu())); connect(m_project->buildConfigurationFactory(), SIGNAL(availableCreationIdsChanged()), SLOT(updateAddButtonMenu()));
...@@ -175,6 +186,27 @@ void BuildSettingsWidget::setupUi() ...@@ -175,6 +186,27 @@ void BuildSettingsWidget::setupUi()
updateBuildSettings(); updateBuildSettings();
} }
void BuildSettingsWidget::addedBuildConfiguration(BuildConfiguration *bc)
{
connect(bc, SIGNAL(displayNameChanged()),
this, SLOT(buildConfigurationDisplayNameChanged()));
}
void BuildSettingsWidget::removedBuildConfiguration(BuildConfiguration *bc)
{
disconnect(bc, SIGNAL(displayNameChanged()),
this, SLOT(buildConfigurationDisplayNameChanged()));
}
void BuildSettingsWidget::buildConfigurationDisplayNameChanged()
{
for (int i = 0; i < m_buildConfigurationComboBox->count(); ++i) {
BuildConfiguration *bc = m_buildConfigurationComboBox->itemData(i).value<BuildConfiguration *>();
m_buildConfigurationComboBox->setItemText(i, bc->displayName());
}
checkMakeActiveLabel();
}
void BuildSettingsWidget::addSubWidget(const QString &name, QWidget *widget) void BuildSettingsWidget::addSubWidget(const QString &name, QWidget *widget)
{ {
widget->setContentsMargins(m_leftMargin, 10, 0, 0); widget->setContentsMargins(m_leftMargin, 10, 0, 0);
...@@ -260,9 +292,6 @@ void BuildSettingsWidget::updateBuildSettings() ...@@ -260,9 +292,6 @@ void BuildSettingsWidget::updateBuildSettings()
m_buildConfigurationComboBox->blockSignals(blocked); m_buildConfigurationComboBox->blockSignals(blocked);
// TODO Restore position, entry from combbox
// TODO? select entry from combobox ?
activeBuildConfigurationChanged(); activeBuildConfigurationChanged();
} }
......
...@@ -98,6 +98,9 @@ private slots: ...@@ -98,6 +98,9 @@ private slots:
void setupUi(); void setupUi();
void addedBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
void removedBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
void buildConfigurationDisplayNameChanged();
private: private:
void cloneConfiguration(BuildConfiguration *toClone); void cloneConfiguration(BuildConfiguration *toClone);
void deleteConfiguration(BuildConfiguration *toDelete); void deleteConfiguration(BuildConfiguration *toDelete);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment