本文整理汇总了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()));
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}