当前位置: 首页>>代码示例>>C++>>正文


C++ AsyncOp::isAborted方法代码示例

本文整理汇总了C++中AsyncOp::isAborted方法的典型用法代码示例。如果您正苦于以下问题:C++ AsyncOp::isAborted方法的具体用法?C++ AsyncOp::isAborted怎么用?C++ AsyncOp::isAborted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AsyncOp的用法示例。


在下文中一共展示了AsyncOp::isAborted方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: onCreateProfileFinished

void ChangeRouterPasswordOp::onCreateProfileFinished()
{
    AsyncOp *op = m_op;
    m_op->deleteLater();
    m_op = NULL;

    if (op->isAborted())
    {
        return;
    }

    int result = op->result();
    LOG_DEBUG(QString::fromUtf8("createWlanProfile result: %1").arg(result));
    if (result == WlanRadioOffError || result == WlanServiceDownError || result == WlanNoDeviceError)
    {
        return notifyFinished(NoError);
    }

    if (result != AsyncOp::NoError)
    {
        return notifyFinished(result);
    }

    m_op = m_bean->reconnectRouter(3000, 10, m_infoResp.value(QLatin1String("NewWLANMACAddress")).toString(), m_infoResp.value(QLatin1String("NewSSID")).toString(), true);
    connect(m_op, SIGNAL(finished()), SLOT(onReconnectFinished()));
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:26,代码来源:BeanImpl.cpp

示例2: onConnectHostFinished

void CheckInternetOp::onConnectHostFinished()
{
    AsyncOp *op = m_op;
    m_op->deleteLater();
    m_op = NULL;

    if (isAborted())
    {
        LOG_DEBUG(QString::fromUtf8("connectHost self aborted!"));
        return;
    }

    if (op->isAborted())
    {
        LOG_DEBUG(QString::fromUtf8("connectHost op aborted!"));
        return notifyFinished(AbortedError);
    }

    int result = op->result();
    LOG_DEBUG(QString::fromUtf8("connectHost result: %1").arg(result));
    if (result != NoError)
    {
        return retry();
    }

    notifyFinished(NoError);
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:27,代码来源:BeanImpl.cpp

示例3: onDiscoverRouterFinished

void ReconnectRouterOp::onDiscoverRouterFinished()
{
    AsyncOp *op = m_op;
    m_op->deleteLater();
    m_op = NULL;

    if (isAborted())
    {
        LOG_DEBUG(QString::fromUtf8("discoverRouter self aborted!"));
        return;
    }

    if (op->isAborted())
    {
        LOG_DEBUG(QString::fromUtf8("discoverRouter op aborted!"));
        return notifyFinished(AbortedError);
    }

    int result = op->result();
    LOG_DEBUG(QString::fromUtf8("discoverRouterSoap result: %1").arg(result));
    if (result != NoError)
    {
        return retry();
    }

    int matchIndex = op->value("matchIndex").toInt();
    LOG_DEBUG(QString::fromUtf8("matchIndex %1").arg(matchIndex));
    if (matchIndex < 0)
    {
        return retry();
    }

    copyValues(op);
    notifyFinished(NoError);
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:35,代码来源:BeanImpl.cpp

示例4: onConnectProfileFinished

void ReconnectRouterOp::onConnectProfileFinished()
{
    AsyncOp *op = m_op;
    m_op->deleteLater();
    m_op = NULL;

    if (isAborted())
    {
        LOG_DEBUG(QString::fromUtf8("connectProfile self aborted!"));
        return;
    }

    if (op->isAborted())
    {
        LOG_DEBUG(QString::fromUtf8("connectProfile op aborted!"));
        return notifyFinished(AbortedError);
    }

    int result = op->result();
    LOG_DEBUG(QString::fromUtf8("connectWlanProfile %1 result: %1").arg(m_wifiName).arg(result));
    if (result == WlanProfileNotFound )
    {
        LOG_DEBUG(QString::fromUtf8("recreate profile?"));
        notifyFinished(WlanProfileNotFound);
    }
    if (result != NoError)
    {
        return retry();
    }

    discoverRouter();
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:32,代码来源:BeanImpl.cpp

示例5: onOpFinished

void MasterDiscoverRouterSoapOp::onOpFinished()
{
    AsyncOp *op = m_op;
    m_op->deleteLater();
    m_op = NULL;

    if (op->isAborted())
    {
        LOG_DEBUG(QString::fromUtf8("MasterDiscoverRouterSoapOp::onOpFinished() aborted"));
        return;
    }

    int result = op->result();
    LOG_DEBUG(QString::fromUtf8("MasterDiscoverRouterSoapOp::onOpFinished() %1").arg(result));

    if (result != NoError)
    {
        if (m_retryCount < m_maxRetryCount)
        {
            LOG_DEBUG(QString::fromUtf8("MasterDiscoverRouterSoapOp Failed, but will retry later"));
            ++m_retryCount;
            m_timer1.setSingleShot(true);
            m_timer1.setInterval(m_retryDelay);
            connect(&m_timer1, SIGNAL(timeout()), SLOT(onRetryTimeout()));
            m_timer1.start();
            return;
        }
        LOG_DEBUG(QString::fromUtf8("MasterDiscoverRouterSoapOp Failed, no more retry chance!"));
        return notifyFinished(UnknownError);
    }

    copyValues(op);
    notifyFinished(NoError);
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:34,代码来源:BeanImpl.cpp

示例6: notifyFinished

void CheckRouterSoapOp::onGetInfo3Finished()
{
    AsyncOp *op = m_op;
    m_op->deleteLater();
    m_op = NULL;

    if (op->isAborted())
    {
        LOG_DEBUG(QString::fromUtf8("CheckRouterSoapOp::onGetInfo3Finished() aborted"));
        return;
    }

    int result = op->result();
    LOG_DEBUG(QString::fromUtf8("CheckRouterSoapOp::onGetInfo3Finished() %1").arg(result));

    if (result != NoError)
    {
        return notifyFinished(UnknownError);
    }

    bool ok;
    int responseCode = op->value("responseCode").toInt(&ok);
    if (!ok || responseCode != 0)
    {
        LOG_DEBUG(QString::fromUtf8("CheckRouterSoapOp::onGetInfo3Finished() response error: %1 %2").arg(responseCode).arg(ok));
        return notifyFinished(result);
    }

    m_values.unite(qvariant_cast<QVariantMap>(op->value("response")));
    setValues(m_values);
    notifyFinished(result);
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:32,代码来源:BeanImpl.cpp

示例7: onConfigOutFinished

void ChangeRouterPasswordOp::onConfigOutFinished()
{
    m_timer1.stop();

    AsyncOp *op = m_op;
    m_op->deleteLater();
    m_op = NULL;

    if (op->isAborted())
    {
        return;
    }

    if (isAborted())
    {
        return;
    }

    int result = op->result();
    if (result != NoError)
    {
        return notifyFinished(result);
    }

    QVariant varResponseCode = op->value("responseCode");
    if (!varResponseCode.isValid())
    {
        return notifyFinished(UnknownError);
    }

    bool ok;
    int responseCode = varResponseCode.toInt(&ok);
    if (!ok)
    {
        return notifyFinished(UnknownError);
    }

//	if (responseCode != 0) {
//		return notifyFinished(UnknownError);
//	}

//	notifyFinished(NoError);

    updateProfile();
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:45,代码来源:BeanImpl.cpp

示例8: onReconnectFinished

void ChangeRouterPasswordOp::onReconnectFinished()
{
    AsyncOp *op = m_op;
    m_op->deleteLater();
    m_op = NULL;

    if (op->isAborted())
    {
        return;
    }

    int result = op->result();
    LOG_DEBUG(QString::fromUtf8("reconnectRouter result: %1").arg(result));

    if (result != NoError)
    {
        notifyFinished(result);
    }

    notifyFinished(NoError);
}
开发者ID:SiteView,项目名称:Lenovo,代码行数:21,代码来源:BeanImpl.cpp


注:本文中的AsyncOp::isAborted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。