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:
hjk
2019-07-26 16:08:13 +02:00
parent 8493a6b044
commit d16330de6d
16 changed files with 42 additions and 79 deletions

View File

@@ -116,6 +116,9 @@ Target::Target(Project *project, Kit *k, _constructor_tag) :
ProjectConfiguration(project, k->id()),
d(std::make_unique<TargetPrivate>(k))
{
// FIXME: Remove, see comment in ProjectConfiguration ctor.
m_target = this;
QTC_CHECK(d->m_kit);
connect(DeviceManager::instance(), &DeviceManager::updated, this, &Target::updateDeviceState);
connect(project, &Project::parsingFinished, this, [this](bool success) {