Commit 2bc872e6 authored by Tobias Hunger's avatar Tobias Hunger Committed by Eike Ziller

BuildConfiguration: Fix caching of environment

Task-number: QTCREATORBUG-19371
Change-Id: I5ab20cd39d18283d0bd9e5c24db69e7ddba387b9
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
parent 4f8905fe
......@@ -56,16 +56,21 @@ const char GENERIC_BC_ID[] = "GenericProjectManager.GenericBuildConfiguration";
GenericBuildConfiguration::GenericBuildConfiguration(Target *parent)
: BuildConfiguration(parent, Core::Id(GENERIC_BC_ID))
{ }
{
updateCacheAndEmitEnvironmentChanged();
}
GenericBuildConfiguration::GenericBuildConfiguration(Target *parent, Core::Id id)
: BuildConfiguration(parent, id)
{ }
{
updateCacheAndEmitEnvironmentChanged();
}
GenericBuildConfiguration::GenericBuildConfiguration(Target *parent, GenericBuildConfiguration *source) :
BuildConfiguration(parent, source)
{
cloneSteps(source);
updateCacheAndEmitEnvironmentChanged();
}
NamedWidget *GenericBuildConfiguration::createConfigWidget()
......
......@@ -98,6 +98,8 @@ BuildConfiguration *AndroidQmakeBuildConfigurationFactory::restore(Target *paren
AndroidQmakeBuildConfiguration::AndroidQmakeBuildConfiguration(Target *target)
: QmakeBuildConfiguration(target)
{
updateCacheAndEmitEnvironmentChanged();
auto updateGrade = [this] { AndroidManager::updateGradleProperties(BuildConfiguration::target()); };
auto project = qobject_cast<QmakeProject *>(target->project());
......@@ -110,11 +112,13 @@ AndroidQmakeBuildConfiguration::AndroidQmakeBuildConfiguration(Target *target)
AndroidQmakeBuildConfiguration::AndroidQmakeBuildConfiguration(Target *target, AndroidQmakeBuildConfiguration *source)
: QmakeBuildConfiguration(target, source)
{
updateCacheAndEmitEnvironmentChanged();
}
AndroidQmakeBuildConfiguration::AndroidQmakeBuildConfiguration(Target *target, Core::Id id)
: QmakeBuildConfiguration(target, id)
{
updateCacheAndEmitEnvironmentChanged();
}
void AndroidQmakeBuildConfiguration::addToEnvironment(Utils::Environment &env) const
......
......@@ -152,6 +152,8 @@ bool QmakeBuildConfiguration::fromMap(const QVariantMap &map)
void QmakeBuildConfiguration::ctor()
{
updateCacheAndEmitEnvironmentChanged();
connect(this, &BuildConfiguration::environmentChanged,
this, &QmakeBuildConfiguration::emitProFileEvaluateNeeded);
connect(target(), &Target::kitChanged,
......
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