forked from qt-creator/qt-creator
ProjectExplorer: Add an official way to connect aspects
Aspects are not completely orthogonal, e.g. working directory depends usually on environment etc. So far handling this used ad-hoc set up in the (Run)Configuration constructor. Lets make this an official second phase, that also reduces the need to use a specific construction order of aspects. Change-Id: Ic98b7d4e1ac9d46a32ec624bbbbfbbc32a40ab32 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -554,6 +554,7 @@ RunConfiguration *RunConfigurationCreationInfo::create(Target *target) const
|
||||
if (!rc)
|
||||
return nullptr;
|
||||
|
||||
rc->acquaintAspects();
|
||||
rc->m_buildKey = buildKey;
|
||||
rc->doAdditionalSetup(*this);
|
||||
rc->setDisplayName(displayName);
|
||||
@@ -569,6 +570,7 @@ RunConfiguration *RunConfigurationFactory::restore(Target *parent, const QVarian
|
||||
if (id.name().startsWith(factory->m_runConfigBaseId.name())) {
|
||||
QTC_ASSERT(factory->m_creator, continue);
|
||||
RunConfiguration *rc = factory->m_creator(parent);
|
||||
rc->acquaintAspects();
|
||||
if (rc->fromMap(map))
|
||||
return rc;
|
||||
delete rc;
|
||||
|
||||
Reference in New Issue
Block a user