forked from qt-creator/qt-creator
ProjectExplorer: Let users provide project-specific environment
Add a new project panel where users can set environment variables for the current project in all configurations. Fixes: QTCREATORBUG-21862 Change-Id: Id98c7f1cf579927a8004a63172f193f943556f44 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -116,6 +116,8 @@ BuildConfiguration::BuildConfiguration(Target *target, Core::Id id)
|
||||
this, &BuildConfiguration::updateCacheAndEmitEnvironmentChanged);
|
||||
connect(this, &BuildConfiguration::environmentChanged,
|
||||
this, &BuildConfiguration::emitBuildDirectoryChanged);
|
||||
connect(target->project(), &Project::environmentChanged,
|
||||
this, &BuildConfiguration::environmentChanged);
|
||||
// Many macroexpanders are based on the current project, so they may change the environment:
|
||||
connect(ProjectTree::instance(), &ProjectTree::currentProjectChanged,
|
||||
this, &BuildConfiguration::updateCacheAndEmitEnvironmentChanged);
|
||||
@@ -343,6 +345,7 @@ Utils::Environment BuildConfiguration::baseEnvironment() const
|
||||
result = Utils::Environment::systemEnvironment();
|
||||
addToEnvironment(result);
|
||||
target()->kit()->addToEnvironment(result);
|
||||
result.modify(project()->additionalEnvironment());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user