forked from qt-creator/qt-creator
ProjectExplorer: Add a ProjectConfiguration::target()
... with a suitable default implementation accessing a member populated at construction time instead of walking the parent chains on each access. Change-Id: I58dae6da80ed0b023cc603fca13a5a205b123672 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -65,6 +65,7 @@ namespace ProjectExplorer {
|
||||
BuildConfiguration::BuildConfiguration(Target *target, Core::Id id)
|
||||
: ProjectConfiguration(target, id)
|
||||
{
|
||||
QTC_CHECK(target && target == this->target());
|
||||
Utils::MacroExpander *expander = macroExpander();
|
||||
expander->setDisplayName(tr("Build Settings"));
|
||||
expander->setAccumulating(true);
|
||||
@@ -271,16 +272,6 @@ void BuildConfiguration::setBuildDirectorySettingsKey(const QString &key)
|
||||
m_buildDirectoryAspect->setSettingsKey(key);
|
||||
}
|
||||
|
||||
Target *BuildConfiguration::target() const
|
||||
{
|
||||
return static_cast<Target *>(parent());
|
||||
}
|
||||
|
||||
Project *BuildConfiguration::project() const
|
||||
{
|
||||
return target()->project();
|
||||
}
|
||||
|
||||
Utils::Environment BuildConfiguration::baseEnvironment() const
|
||||
{
|
||||
Utils::Environment result;
|
||||
|
||||
Reference in New Issue
Block a user