本文整理汇总了C++中boost::optional::versionId方法的典型用法代码示例。如果您正苦于以下问题:C++ optional::versionId方法的具体用法?C++ optional::versionId怎么用?C++ optional::versionId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boost::optional
的用法示例。
在下文中一共展示了optional::versionId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: measureDownloadComplete
void BuildingComponentDialogCentralWidget::measureDownloadComplete(const std::string& uid, const boost::optional<BCLMeasure>& measure)
{
QObject* sender = this->sender();
if (sender){
sender->deleteLater();
}
if (measure){
// good
// remove old measure
boost::optional<BCLMeasure> oldMeasure = LocalBCL::instance().getMeasure(measure->uid());
if (oldMeasure && oldMeasure->versionId() != measure->versionId()){
LocalBCL::instance().removeMeasure(*oldMeasure);
}
}else{
// error downloading measure
// find measure in list by uid and re-enable
for (Component* component : m_collapsibleComponentList->components()) {
if (component->uid() == uid){
component->checkBox()->setEnabled(true);
break;
}
}
}
m_pendingDownloads.erase(uid);
if (m_pendingDownloads.empty()){
// show not busy
m_progressBar->setValue(0);
m_progressBar->setMinimum(0);
m_progressBar->setMaximum(0);
m_progressBar->setVisible(false);
m_showNewComponents = true;
}
}