コード例 #1
0
ファイル: iosdeploystep.cpp プロジェクト: ZerpHmm/qt-creator
void IosDeployStep::run(QFutureInterface<bool> &fi)
{
    m_futureInterface = fi;
    QTC_CHECK(m_transferStatus == NoTransfer);
    if (iosdevice().isNull()) {
        if (iossimulator().isNull())
            TaskHub::addTask(Task::Error, tr("Deployment failed. No iOS device found."),
                             ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
        m_futureInterface.reportResult(!iossimulator().isNull());
        cleanup();
        emit finished();
        return;
    }
    m_transferStatus = TransferInProgress;
    QTC_CHECK(m_toolHandler == 0);
    m_toolHandler = new IosToolHandler(IosDeviceType::IosDevice, this);
    m_futureInterface.setProgressRange(0, 200);
    m_futureInterface.setProgressValueAndText(0, QLatin1String("Transferring application"));
    m_futureInterface.reportStarted();
    connect(m_toolHandler, SIGNAL(isTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)),
            SLOT(handleIsTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)));
    connect(m_toolHandler, SIGNAL(didTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)),
            SLOT(handleDidTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)));
    connect(m_toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
            SLOT(handleFinished(Ios::IosToolHandler*)));
    connect(m_toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
            SLOT(handleErrorMsg(Ios::IosToolHandler*,QString)));
    m_toolHandler->requestTransferApp(appBundle(), deviceId());
}
コード例 #2
0
void IosDeployStep::run(QFutureInterface<bool> &fi)
{
    m_futureInterface = fi;
    QTC_CHECK(m_transferStatus == NoTransfer);
    if (iosdevice().isNull()) {
        m_futureInterface.reportResult(!iossimulator().isNull());
        cleanup();
        m_futureInterface.reportFinished();
        return;
    }
    m_transferStatus = TransferInProgress;
    IosToolHandler *toolHandler = new IosToolHandler(IosToolHandler::IosDeviceType, this);
    m_futureInterface.setProgressRange(0, 200);
    m_futureInterface.setProgressValueAndText(0, QLatin1String("Transferring application"));
    m_futureInterface.reportStarted();
    connect(toolHandler, SIGNAL(isTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)),
            SLOT(handleIsTransferringApp(Ios::IosToolHandler*,QString,QString,int,int,QString)));
    connect(toolHandler, SIGNAL(didTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)),
            SLOT(handleDidTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)));
    connect(toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
            SLOT(handleFinished(Ios::IosToolHandler*)));
    connect(toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
            SLOT(handleErrorMsg(Ios::IosToolHandler*,QString)));
    toolHandler->requestTransferApp(appBundle(), deviceId());
}
コード例 #3
0
ファイル: iosdeploystep.cpp プロジェクト: ZerpHmm/qt-creator
QString IosDeployStep::deviceId() const
{
    if (iosdevice().isNull())
        return QString();
    return iosdevice()->uniqueDeviceID();
}