BuildStep *MaemoPackageCreationFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) { Q_ASSERT(canRestore(parent, map)); BuildStep * step = 0; const QString id = ProjectExplorer::idFromMap(map); if (id == MaemoDebianPackageCreationStep::CreatePackageId || (id == OldCreatePackageId && qobject_cast<AbstractDebBasedQt4MaemoTarget *>(parent->target()))) { step = new MaemoDebianPackageCreationStep(parent); } else if (id == MaemoRpmPackageCreationStep::CreatePackageId || (id == OldCreatePackageId && qobject_cast<AbstractRpmBasedQt4MaemoTarget *>(parent->target()))) { step = new MaemoRpmPackageCreationStep(parent); } else if (id == MaemoTarPackageCreationStep::CreatePackageId) { step = new MaemoTarPackageCreationStep(parent); } Q_ASSERT(step); if (!step->fromMap(map)) { delete step; return 0; } return step; }
BuildStep *WinRtDeployStepFactory::restore(BuildStepList *parent, const QVariantMap &map) { BuildStep *bs = create(parent, idFromMap(map)); if (!bs->fromMap(map)) { delete bs; bs = 0; } return bs; }
BuildStep *IBuildStepFactory::restore(BuildStepList *parent, const QVariantMap &map) { const Core::Id id = idFromMap(map); BuildStep *bs = create(parent, id); if (bs->fromMap(map)) return bs; delete bs; return nullptr; }
BuildStep *MaemoPackageCreationFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) { Q_ASSERT(canRestore(parent, map)); BuildStep * step = 0; const Core::Id id = ProjectExplorer::idFromMap(map); if (id == MaemoDebianPackageCreationStep::CreatePackageId) step = new MaemoDebianPackageCreationStep(parent); QTC_ASSERT(step, return 0); if (!step->fromMap(map)) { delete step; return 0; } return step; }