| 340 | } |
| 341 | |
| 342 | void DocumentClassesFolder::removeClassNode(ClassModelNodes::ClassNode* a_node) |
| 343 | { |
| 344 | // Get the parent namespace identifier. |
| 345 | QualifiedIdentifier parentNamespaceIdentifier; |
| 346 | if (auto namespaceParent = dynamic_cast<StaticNamespaceFolderNode*>(a_node->parent())) { |
| 347 | parentNamespaceIdentifier = namespaceParent->qualifiedIdentifier(); |
| 348 | } |
| 349 | |
| 350 | // Remove the node. |
| 351 | a_node->removeSelf(); |
| 352 | |
| 353 | // Remove empty namespace |
| 354 | removeEmptyNamespace(parentNamespaceIdentifier); |
| 355 | } |
| 356 | |
| 357 | void DocumentClassesFolder::removeEmptyNamespace(const QualifiedIdentifier& a_identifier) |
| 358 | { |
nothing calls this directly
no test coverage detected