本文整理汇总了C++中AsyncOp::abort方法的典型用法代码示例。如果您正苦于以下问题:C++ AsyncOp::abort方法的具体用法?C++ AsyncOp::abort怎么用?C++ AsyncOp::abort使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AsyncOp
的用法示例。
在下文中一共展示了AsyncOp::abort方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onSoapFinished
void DiscoverRouterSoapOp::onSoapFinished()
{
if (!m_mac.isNull())
{
AsyncOp *op = qobject_cast<AsyncOp*>(sender());
if (op)
{
int index = -1;
for (int i = 0; i < m_opList.count(); i++)
{
if (m_opList.at(i) == op)
{
index = i;
break;
}
}
if (index >= 0)
{
QString mac = op->values().value(QLatin1String("newwlanmacaddress")).toString().toUpper();
if (mac.compare(m_mac, Qt::CaseInsensitive) == 0)
{
LOG_DEBUG(QString::fromUtf8("DiscoverRouterSoapOp fast path for %1 %2").arg(mac).arg(m_ls.at(index)));
for (int i = 0; i < m_opList.count(); i++)
{
AsyncOp *op = m_opList.at(i);
disconnect(op, SIGNAL(finished()), this, SLOT(onSoapFinished()));
op->abort();
}
QVariantMap varMap = op->values();
varMap.insert(QLatin1String("soapHostName"), m_ls.at(index));
QVariantList fullList;
fullList.push_back(varMap);
setValue("fullList", fullList);
setValue("matchIndex", 0);
return notifyFinished(NoError);
}
}
}
}
if (m_count++ == m_opList.count())
{
process();
}
}