예제 #1
0
bool S60DeviceRunConfigurationFactory::canCreate(Target *parent, const QString &id) const
{
    Qt4SymbianTarget *t = qobject_cast<Qt4SymbianTarget *>(parent);
    if (!t || t->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
        return false;
    return t->qt4Project()->hasApplicationProFile(pathFromId(id));
}
예제 #2
0
bool S60DeviceRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
{
    Qt4SymbianTarget *t = qobject_cast<Qt4SymbianTarget *>(parent);
    if (!t || t->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
        return false;
    QString id = ProjectExplorer::idFromMap(map);
    return id == QLatin1String(S60_DEVICE_RC_ID);
}
예제 #3
0
QStringList S60DeviceRunConfigurationFactory::availableCreationIds(Target *parent) const
{
    Qt4SymbianTarget *target = qobject_cast<Qt4SymbianTarget *>(parent);
    if (!target || target->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
        return QStringList();

    return target->qt4Project()->applicationProFilePathes(QLatin1String(S60_DEVICE_RC_PREFIX));
}
QList<Core::Id> S60DeviceRunConfigurationFactory::availableCreationIds(Target *parent) const
{
    QList<Core::Id> result;
    Qt4SymbianTarget *target = qobject_cast<Qt4SymbianTarget *>(parent);
    if (!target || target->id() != Core::Id(Constants::S60_DEVICE_TARGET_ID))
        return result;

    QStringList proFiles = target->qt4Project()->applicationProFilePathes(QLatin1String(S60_DEVICE_RC_PREFIX));
    foreach (const QString &pf, proFiles)
        result << Core::Id(pf.toUtf8().constData());
    return result;
}