forked from qt-creator/qt-creator
EnvironmentAspect: Fix various aspects broken in the refactoring
Switching the base environment needs to update the environment. Fetching remote environment didn't work. Task-number: QTCREATORBUG-9734 Change-Id: I4dd0052b364c5c3cfea17d8169de8a235d37b891 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -97,6 +97,8 @@ EnvironmentAspectWidget::EnvironmentAspectWidget(EnvironmentAspect *aspect, QWid
|
||||
connect(m_aspect, SIGNAL(baseEnvironmentChanged()), this, SLOT(changeBaseEnvironment()));
|
||||
connect(m_aspect, SIGNAL(userEnvironmentChangesChanged(QList<Utils::EnvironmentItem>)),
|
||||
this, SLOT(changeUserChanges(QList<Utils::EnvironmentItem>)));
|
||||
connect(m_aspect, SIGNAL(environmentChanged()),
|
||||
this, SLOT(environmentChanged()));
|
||||
}
|
||||
|
||||
QString EnvironmentAspectWidget::displayName() const
|
||||
@@ -118,6 +120,7 @@ void EnvironmentAspectWidget::baseEnvironmentSelected(int idx)
|
||||
{
|
||||
m_ignoreChange = true;
|
||||
m_aspect->setBaseEnvironmentBase(m_baseEnvironmentComboBox->itemData(idx).toInt());
|
||||
m_environmentWidget->setBaseEnvironment(m_aspect->baseEnvironment());
|
||||
m_ignoreChange = false;
|
||||
}
|
||||
|
||||
@@ -132,6 +135,7 @@ void EnvironmentAspectWidget::changeBaseEnvironment()
|
||||
m_baseEnvironmentComboBox->setCurrentIndex(i);
|
||||
}
|
||||
m_environmentWidget->setBaseEnvironmentText(m_aspect->baseEnvironmentDisplayName(base));
|
||||
m_environmentWidget->setBaseEnvironment(m_aspect->baseEnvironment());
|
||||
}
|
||||
|
||||
void EnvironmentAspectWidget::userChangesEdited()
|
||||
@@ -148,4 +152,11 @@ void EnvironmentAspectWidget::changeUserChanges(QList<Utils::EnvironmentItem> ch
|
||||
m_environmentWidget->setUserChanges(changes);
|
||||
}
|
||||
|
||||
void EnvironmentAspectWidget::environmentChanged()
|
||||
{
|
||||
if (m_ignoreChange)
|
||||
return;
|
||||
m_environmentWidget->setBaseEnvironment(m_aspect->baseEnvironment());
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
Reference in New Issue
Block a user