DeployConfiguration *DeployConfigurationFactory::restore(Target *parent, const QVariantMap &map) { if (!canRestore(parent, map)) return 0; DeployConfiguration *dc = new DeployConfiguration(parent, idFromMap(map)); if (!dc->fromMap(map)) { delete dc; return 0; } return dc; }
bool S60DeployConfiguration::isSigned() const { DeployConfiguration *dc = target()->activeDeployConfiguration(); QTC_ASSERT(dc, return false); BuildStepList *bsl = dc->stepList(); QTC_ASSERT(bsl, return false); QList<BuildStep *> steps = bsl->steps(); foreach (const BuildStep *step, steps) { if (const S60CreatePackageStep *packageStep = qobject_cast<const S60CreatePackageStep *>(step)) { return packageStep->signingMode() != S60CreatePackageStep::NotSigned; } } return false; }
bool S60DeployConfiguration::runSmartInstaller() const { DeployConfiguration *dc = target()->activeDeployConfiguration(); QTC_ASSERT(dc, return false); BuildStepList *bsl = dc->stepList(); QTC_ASSERT(bsl, return false); QList<BuildStep *> steps = bsl->steps(); foreach (const BuildStep *step, steps) { if (const S60CreatePackageStep *packageStep = qobject_cast<const S60CreatePackageStep *>(step)) { return packageStep->createsSmartInstaller(); } } return false; }
bool MerRunConfiguration::isEnabled() const { //TODO Hack DeployConfiguration* conf = target()->activeDeployConfiguration(); if(target()->kit()) { if (conf->id() == MerMb2RpmBuildConfiguration::configurationId()) { m_disabledReason = tr("This deployment method does not support run configuration"); return false; } } return RemoteLinuxRunConfiguration::isEnabled(); }
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; }
QString MerRunConfiguration::defaultRemoteExecutableFilePath() const { DeployConfiguration* conf = target()->activeDeployConfiguration(); if (!conf) return QString(); QString executable = RemoteLinuxRunConfiguration::defaultRemoteExecutableFilePath(); if (conf->id() == MerRsyncDeployConfiguration::configurationId()) { QString projectName = target()->project()->displayName(); return QLatin1String("/opt/sdk/") + projectName + executable; } if (conf->id() == MerRpmDeployConfiguration::configurationId()) { //TODO: return executable; } return executable; }
IosDeployStep *IosRunConfiguration::deployStep() const { DeployConfiguration *config = target()->activeDeployConfiguration(); return config ? config->stepList()->firstOfType<IosDeployStep>() : nullptr; }