ProjectExplorer: Introduce a ProjectConfiguration::kit() function

For convenience, and use it in some places.

Change-Id: I8f7cb502b37b2fbf4cf2d17cac9c6299558332dc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-09-07 15:56:18 +02:00
parent 552a1296fe
commit 61bfd32438
34 changed files with 82 additions and 79 deletions

View File

@@ -112,7 +112,7 @@ IosDeployStep::IosDeployStep(BuildStepList *parent, Utils::Id id)
void IosDeployStep::updateDisplayNames()
{
IDevice::ConstPtr dev = DeviceKitAspect::device(target()->kit());
IDevice::ConstPtr dev = DeviceKitAspect::device(kit());
const QString devName = dev.isNull() ? IosDevice::name() : dev->displayName();
setDefaultDisplayName(tr("Deploy to %1").arg(devName));
setDisplayName(tr("Deploy to %1").arg(devName));
@@ -121,7 +121,7 @@ void IosDeployStep::updateDisplayNames()
bool IosDeployStep::init()
{
QTC_ASSERT(m_transferStatus == NoTransfer, return false);
m_device = DeviceKitAspect::device(target()->kit());
m_device = DeviceKitAspect::device(kit());
auto runConfig = qobject_cast<const IosRunConfiguration *>(
this->target()->activeRunConfiguration());
QTC_ASSERT(runConfig, return false);