Esempio n. 1
0
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;
}
QtSupport::BaseQtVersion *EmbeddedLinuxQtVersionFactory::restore(const QString &type, const QVariantMap &data)
{
    if (!canRestore(type))
        return 0;
    EmbeddedLinuxQtVersion *v = new EmbeddedLinuxQtVersion;
    v->fromMap(data);
    return v;
}
BuildConfiguration *GenericBuildConfigurationFactory::restore(Target *parent, const QVariantMap &map)
{
    if (!canRestore(parent, map))
        return 0;
    GenericBuildConfiguration *bc(new GenericBuildConfiguration(parent));
    if (bc->fromMap(map))
        return bc;
    delete bc;
    return 0;
}
BuildStep *AndroidDeployStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
{
    Q_ASSERT(canRestore(parent, map));
    AndroidDeployStep * const step = new AndroidDeployStep(parent);
    if (!step->fromMap(map)) {
        delete step;
        return 0;
    }
    return step;
}
Esempio n. 5
0
BuildStep *IosBuildStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
{
    if (!canRestore(parent, map))
        return 0;
    IosBuildStep *bs(new IosBuildStep(parent));
    if (bs->fromMap(map))
        return bs;
    delete bs;
    return 0;
}
Esempio n. 6
0
BuildStep *MaemoDeployStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
{
    Q_ASSERT(canRestore(parent, map));
    BuildStep * const step = create(parent, idFromMap(map));
    if (!step->fromMap(map)) {
        delete step;
        return 0;
    }
    return step;
}
ProjectExplorer::BuildStep *QmakeAndroidBuildApkStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map)
{
    Q_ASSERT(canRestore(parent, map));
    QmakeAndroidBuildApkStep * const step = new QmakeAndroidBuildApkStep(parent);
    if (!step->fromMap(map)) {
        delete step;
        return 0;
    }
    return step;
}
Esempio n. 8
0
ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::restore(ProjectExplorer::Target *parent, const QVariantMap &map)
{
    if (!canRestore(parent, map))
        return 0;
    QmlProjectTarget *qmlparent = static_cast<QmlProjectTarget *>(parent);
    QmlProjectRunConfiguration *rc = new QmlProjectRunConfiguration(qmlparent);
    if (rc->fromMap(map))
        return rc;
    delete rc;
    return 0;
}
DeployConfiguration *IosDeployConfigurationFactory::restore(Target *parent, const QVariantMap &map)
{
    if (!canRestore(parent, map))
        return 0;

    IosDeployConfiguration *dc = new IosDeployConfiguration(parent, idFromMap(map));
    if (dc->fromMap(map))
        return dc;

    delete dc;
    return 0;
}
BuildStep *AndroidPackageCreationFactory::restore(ProjectExplorer::BuildStepList *parent,
                                                  const QVariantMap &map)
{
    Q_ASSERT(canRestore(parent, map));
    AndroidPackageCreationStep *const step
        = new AndroidPackageCreationStep(parent);
    if (!step->fromMap(map)) {
        delete step;
        return 0;
    }
    return step;
}
ProjectExplorer::DeployConfiguration *QnxDeployConfigurationFactory::restore(ProjectExplorer::Target *parent, const QVariantMap &map)
{
    if (!canRestore(parent, map))
        return 0;
    Core::Id id = ProjectExplorer::idFromMap(map);
    QnxDeployConfiguration * const dc = new QnxDeployConfiguration(parent, id, displayNameForId(id));
    if (!dc->fromMap(map)) {
        delete dc;
        return 0;
    }
    return dc;
}
Esempio n. 12
0
RunConfiguration *MaemoRunConfigurationFactory::restore(Target *parent,
        const QVariantMap &map)
{
    if (!canRestore(parent, map))
        return 0;
    AbstractQt4MaemoTarget *target = static_cast<AbstractQt4MaemoTarget *>(parent);
    MaemoRunConfiguration *rc = new MaemoRunConfiguration(target, QString());
    if (rc->fromMap(map))
        return rc;

    delete rc;
    return 0;
}
Esempio n. 13
0
DeployConfiguration *RemoteLinuxDeployConfigurationFactory::restore(Target *parent,
    const QVariantMap &map)
{
    if (!canRestore(parent, map))
        return 0;
    QString id = idFromMap(map);
    RemoteLinuxDeployConfiguration * const dc = new RemoteLinuxDeployConfiguration(parent, id,
        genericLinuxDisplayName(), QLatin1String(Constants::GenericLinuxOsType));
    if (!dc->fromMap(map)) {
        delete dc;
        return 0;
    }
    return dc;
}
DeployConfiguration *RemoteLinuxDeployConfigurationFactory::restore(Target *parent,
    const QVariantMap &map)
{
    if (!canRestore(parent, map))
        return 0;
    Core::Id id = idFromMap(map);
    RemoteLinuxDeployConfiguration * const dc = new RemoteLinuxDeployConfiguration(parent, id,
        genericLinuxDisplayName());
    if (!dc->fromMap(map)) {
        delete dc;
        return 0;
    }
    return dc;
}