MCPcopy Create free account
hub / github.com/KDE/kdevelop / removeClassNode

Method removeClassNode

kdevplatform/language/classmodel/documentclassesfolder.cpp:342–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342void 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
357void DocumentClassesFolder::removeEmptyNamespace(const QualifiedIdentifier& a_identifier)
358{

Callers

nothing calls this directly

Calls 3

parentMethod · 0.45
qualifiedIdentifierMethod · 0.45
removeSelfMethod · 0.45

Tested by

no test coverage detected