| 308 | } |
| 309 | |
| 310 | void NodeTree::onChildClosed(NodeID nid) |
| 311 | { |
| 312 | |
| 313 | bool allClosed = true; |
| 314 | |
| 315 | for (auto i = childrenCount(nid); i--;) |
| 316 | { |
| 317 | auto kid = getChild(nid, i); |
| 318 | if (isOpen(kid)) |
| 319 | { |
| 320 | allClosed = false; |
| 321 | break; |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | if (allClosed) |
| 326 | { |
| 327 | closeNode(nid); |
| 328 | |
| 329 | if (!hasSolvedChildren(nid)) |
| 330 | { |
| 331 | emit failedSubtreeClosed(nid); |
| 332 | } |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | void NodeTree::closeNode(NodeID nid) |
| 337 | { |
nothing calls this directly
no outgoing calls
no test coverage detected