forked from qt-creator/qt-creator
ProjectExplorer: Add some more functions to buildsteplist
Use those functions instead of repeating code all over the place. Change-Id: I03161663b4d5c538fb2ea667353ab7846373ad81 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -174,19 +174,8 @@ void IosRunConfiguration::updateDisplayNames()
|
||||
|
||||
IosDeployStep *IosRunConfiguration::deployStep() const
|
||||
{
|
||||
IosDeployStep * step = 0;
|
||||
DeployConfiguration *config = target()->activeDeployConfiguration();
|
||||
BuildStepList *bsl = config->stepList();
|
||||
if (bsl) {
|
||||
const QList<BuildStep *> &buildSteps = bsl->steps();
|
||||
for (int i = buildSteps.count() - 1; i >= 0; --i) {
|
||||
step = qobject_cast<IosDeployStep *>(buildSteps.at(i));
|
||||
if (step)
|
||||
break;
|
||||
}
|
||||
}
|
||||
Q_ASSERT_X(step, Q_FUNC_INFO, "Impossible: iOS build configuration without deploy step.");
|
||||
return step;
|
||||
return config ? config->stepList()->firstOfType<IosDeployStep>() : nullptr;
|
||||
}
|
||||
|
||||
FileName IosRunConfiguration::profilePath() const
|
||||
|
||||
Reference in New Issue
Block a user