ProjectExplorer: Properly handle project environment changes

... in the build configuration. We need to update the cache, so that the
changes are propagated to run configurations.

Fixes: QTCREATORBUG-25947
Change-Id: I1051df7dd03274acba1e66c3cbb9d3cb01552b4b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2021-07-02 10:30:23 +02:00
parent cd7c8160ea
commit 843999d578

View File

@@ -196,7 +196,7 @@ BuildConfiguration::BuildConfiguration(Target *target, Utils::Id id)
connect(this, &BuildConfiguration::environmentChanged, connect(this, &BuildConfiguration::environmentChanged,
this, &BuildConfiguration::emitBuildDirectoryChanged); this, &BuildConfiguration::emitBuildDirectoryChanged);
connect(target->project(), &Project::environmentChanged, connect(target->project(), &Project::environmentChanged,
this, &BuildConfiguration::environmentChanged); this, &BuildConfiguration::updateCacheAndEmitEnvironmentChanged);
// Many macroexpanders are based on the current project, so they may change the environment: // Many macroexpanders are based on the current project, so they may change the environment:
connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged, connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged,
this, &BuildConfiguration::updateCacheAndEmitEnvironmentChanged); this, &BuildConfiguration::updateCacheAndEmitEnvironmentChanged);