Adjust environment to changes in the baseenvironment

This commit is contained in:
dt
2009-05-27 14:41:07 +02:00
parent 153f6aab33
commit b3bccbc2e8
4 changed files with 25 additions and 2 deletions
+2 -1
View File
@@ -151,7 +151,8 @@ signals:
void removedRunConfiguration(const QString &name);
void addedRunConfiguration(const QString &name);
// This signal is jut there for updating the tree list in the buildsettings wizard
void buildConfigurationDisplayNameChanged(const QString &buildConfiguraiton);
void buildConfigurationDisplayNameChanged(const QString &buildConfiguration);
void environmentChanged(const QString &buildConfiguration);
protected:
/* This method is called when the project .user file is saved. Simply call
+8 -1
View File
@@ -724,7 +724,10 @@ ProjectExplorer::Environment Qt4Project::environment(const QString &buildConfigu
void Qt4Project::setUseSystemEnvironment(const QString &buildConfiguration, bool b)
{
if (useSystemEnvironment(buildConfiguration) == b)
return;
setValue(buildConfiguration, "clearSystemEnvironment", !b);
emit environmentChanged(buildConfiguration);
}
bool Qt4Project::useSystemEnvironment(const QString &buildConfiguration) const
@@ -740,7 +743,11 @@ QList<ProjectExplorer::EnvironmentItem> Qt4Project::userEnvironmentChanges(const
void Qt4Project::setUserEnvironmentChanges(const QString &buildConfig, const QList<ProjectExplorer::EnvironmentItem> &diff)
{
setValue(buildConfig, "userEnvironmentChanges", EnvironmentItem::toStringList(diff));
QStringList list = EnvironmentItem::toStringList(diff);
if (list == value(buildConfig, "userEnvironmentChanges").toStringList())
return;
setValue(buildConfig, "userEnvironmentChanges", list);
emit environmentChanged(buildConfig);
}
QString Qt4Project::qtDir(const QString &buildConfiguration) const
@@ -71,6 +71,12 @@ Qt4RunConfiguration::Qt4RunConfiguration(Qt4Project *pro, const QString &proFile
connect(pro, SIGNAL(activeBuildConfigurationChanged()),
this, SLOT(invalidateCachedTargetInformation()));
connect(pro, SIGNAL(activeBuildConfigurationChanged()),
this, SIGNAL(baseEnvironmentChanged()));
connect(pro, SIGNAL(environmentChanged(QString)),
this, SIGNAL(baseEnvironmentChanged()));
}
Qt4RunConfiguration::~Qt4RunConfiguration()
@@ -178,6 +184,13 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
connect(qt4RunConfiguration, SIGNAL(userEnvironmentChangesChanged(QList<ProjectExplorer::EnvironmentItem>)),
this, SLOT(userEnvironmentChangesChanged(QList<ProjectExplorer::EnvironmentItem>)));
connect(qt4RunConfiguration, SIGNAL(baseEnvironmentChanged()),
this, SLOT(baseEnvironmentChanged()));
}
void Qt4RunConfigurationWidget::baseEnvironmentChanged()
{
m_environmentWidget->setBaseEnvironment(m_qt4RunConfiguration->baseEnvironment());
}
void Qt4RunConfigurationWidget::userEnvironmentChangesChanged(const QList<ProjectExplorer::EnvironmentItem> &userChanges)
@@ -93,6 +93,7 @@ signals:
void workingDirectoryChanged(const QString&);
void runModeChanged(ProjectExplorer::ApplicationRunConfiguration::RunMode runMode);
void usingDyldImageSuffixChanged(bool);
void baseEnvironmentChanged();
void userEnvironmentChangesChanged(const QList<ProjectExplorer::EnvironmentItem> &diff);
// note those signals might not emited for every change
@@ -147,6 +148,7 @@ private slots:
void nameChanged(const QString &name);
void runModeChanged(ProjectExplorer::ApplicationRunConfiguration::RunMode runMode);
void userEnvironmentChangesChanged(const QList<ProjectExplorer::EnvironmentItem> &userChanges);
void baseEnvironmentChanged();
void effectiveTargetInformationChanged();
void termToggled(bool);