| 49 | } |
| 50 | |
| 51 | LocalTreeItem *LocalTreeItem::updateVariable(dap::Variable &var) |
| 52 | { |
| 53 | auto it = std::find_if(children.begin(), children.end(), [&](const auto& child) { |
| 54 | return child->itemVariable.name == var.name; |
| 55 | }); |
| 56 | |
| 57 | if (it != children.end()) { |
| 58 | auto child = *it; |
| 59 | bool updated = child->itemVariable.value != var.value; |
| 60 | child->setVariable(var); |
| 61 | child->updated = updated; |
| 62 | |
| 63 | if (child->childrenFetched) { |
| 64 | child->setChildrenFetched(false); |
| 65 | emit updateChildVariables(child->index()); |
| 66 | } |
| 67 | |
| 68 | emit model->dataChanged(index(), index()); |
| 69 | return child; |
| 70 | } |
| 71 | |
| 72 | return nullptr; |
| 73 | } |
| 74 | |
| 75 | void LocalTreeItem::removeRedundantItems(const QList<LocalTreeItem *> &itemList) |
| 76 | { |
no test coverage detected