Commit 97929c44 authored by dt's avatar dt
Browse files

Ensure that the environment widget is updated correctly

parent ef3abd9b
......@@ -68,6 +68,13 @@ void CMakeBuildEnvironmentWidget::init(ProjectExplorer::BuildConfiguration *bc)
if (debug)
qDebug() << "Qt4BuildConfigWidget::init()";
if (m_buildConfiguration) {
disconnect(m_buildConfiguration, SIGNAL(environmentChanged()),
this, SLOT(environmentChanged()));
}
connect(m_buildConfiguration, SIGNAL(environmentChanged()),
this, SLOT(environmentChanged()));
m_buildConfiguration = static_cast<CMakeBuildConfiguration *>(bc);
m_clearSystemEnvironmentCheckBox->setChecked(!m_buildConfiguration->useSystemEnvironment());
......@@ -86,3 +93,8 @@ void CMakeBuildEnvironmentWidget::clearSystemEnvironmentCheckBoxClicked(bool che
m_buildConfiguration->setUseSystemEnvironment(!checked);
m_buildEnvironmentWidget->setBaseEnvironment(m_buildConfiguration->baseEnvironment());
}
void CMakeBuildEnvironmentWidget::environmentChanged()
{
m_buildEnvironmentWidget->setBaseEnvironment(m_buildConfiguration->baseEnvironment());
}
......@@ -57,6 +57,7 @@ public:
private slots:
void environmentModelUserChangesChanged();
void clearSystemEnvironmentCheckBoxClicked(bool checked);
void environmentChanged();
private:
ProjectExplorer::EnvironmentWidget *m_buildEnvironmentWidget;
......
......@@ -242,6 +242,7 @@ void Qt4BuildConfiguration::setQtVersion(int id)
setValue(KEY_QT_VERSION_ID, id);
emit qtVersionChanged();
emit targetInformationChanged();
emit environmentChanged();
}
void Qt4BuildConfiguration::setToolChainType(ProjectExplorer::ToolChain::ToolChainType type)
......@@ -251,6 +252,7 @@ void Qt4BuildConfiguration::setToolChainType(ProjectExplorer::ToolChain::ToolCha
setValue("ToolChain", (int)type);
emit toolChainTypeChanged();
emit targetInformationChanged();
emit environmentChanged();
}
ProjectExplorer::ToolChain::ToolChainType Qt4BuildConfiguration::toolChainType() const
......@@ -322,6 +324,7 @@ void Qt4BuildConfiguration::defaultQtVersionChanged()
if (qtVersionId() == 0) {
emit qtVersionChanged();
emit targetInformationChanged();
emit environmentChanged();
}
}
......
......@@ -71,7 +71,15 @@ void Qt4BuildEnvironmentWidget::init(ProjectExplorer::BuildConfiguration *bc)
if (debug)
qDebug() << "Qt4BuildConfigWidget::init()";
if (m_buildConfiguration) {
disconnect(this, SIGNAL(environmentChanged()),
this, SLOT(environmentChanged()));
}
m_buildConfiguration = static_cast<Qt4BuildConfiguration *>(bc);
connect(m_buildConfiguration, SIGNAL(environmentChanged()),
this, SLOT(environmentChanged()));
m_clearSystemEnvironmentCheckBox->setChecked(!m_buildConfiguration->useSystemEnvironment());
m_buildEnvironmentWidget->setBaseEnvironment(m_buildConfiguration->baseEnvironment());
m_buildEnvironmentWidget->setUserChanges(m_buildConfiguration->userEnvironmentChanges());
......@@ -88,3 +96,8 @@ void Qt4BuildEnvironmentWidget::clearSystemEnvironmentCheckBoxClicked(bool check
m_buildConfiguration->setUseSystemEnvironment(!checked);
m_buildEnvironmentWidget->setBaseEnvironment(m_buildConfiguration->baseEnvironment());
}
void Qt4BuildEnvironmentWidget::environmentChanged()
{
m_buildEnvironmentWidget->setBaseEnvironment(m_buildConfiguration->baseEnvironment());
}
......@@ -60,6 +60,7 @@ public:
private slots:
void environmentModelUserChangesUpdated();
void clearSystemEnvironmentCheckBoxClicked(bool checked);
void environmentChanged();
private:
ProjectExplorer::EnvironmentWidget *m_buildEnvironmentWidget;
......
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