Commit 9489496c authored by Daniel Teske's avatar Daniel Teske

RunSettingsPage: En/disable "Remove" button on changes to the target

Change-Id: Ie3cb734b99e468e6fa56265ac59992bb8402f33a
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent e9f7fb93
......@@ -251,6 +251,16 @@ RunSettingsWidget::RunSettingsWidget(Target *target)
connect(m_renameRunButton, SIGNAL(clicked()),
this, SLOT(renameRunConfiguration()));
connect(m_target, SIGNAL(addedRunConfiguration(ProjectExplorer::RunConfiguration*)),
this, SLOT(updateRemoveToolButton()));
connect(m_target, SIGNAL(removedRunConfiguration(ProjectExplorer::RunConfiguration*)),
this, SLOT(updateRemoveToolButton()));
connect(m_target, SIGNAL(addedDeployConfiguration(ProjectExplorer::DeployConfiguration*)),
this, SLOT(updateRemoveToolButton()));
connect(m_target, SIGNAL(removedDeployConfiguration(ProjectExplorer::DeployConfiguration*)),
this, SLOT(updateRemoveToolButton()));
connect(m_target, SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
this, SLOT(activeRunConfigurationChanged()));
}
......@@ -457,6 +467,12 @@ void RunSettingsWidget::renameDeployConfiguration()
m_target->activeDeployConfiguration()->setDisplayName(name);
}
void RunSettingsWidget::updateRemoveToolButton()
{
m_removeDeployToolButton->setEnabled(m_target->deployConfigurations().count() > 1);
m_removeRunToolButton->setEnabled(m_target->runConfigurations().size() > 1);
}
void RunSettingsWidget::updateDeployConfiguration(DeployConfiguration *dc)
{
delete m_deployConfigurationWidget;
......
......@@ -91,6 +91,8 @@ private slots:
void activeDeployConfigurationChanged();
void renameDeployConfiguration();
void updateRemoveToolButton();
private:
QString uniqueDCName(const QString &name);
QString uniqueRCName(const QString &name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment