MCPcopy Create free account
hub / github.com/cneben/QuickQanava / removeNode

Method removeNode

src/qanGraph.cpp:708–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706}
707
708bool Graph::removeNode(qan::Node* node, bool force)
709{
710 // PRECONDITIONS:
711 // node can't be nullptr
712 // node can't be protected or locked
713 if (node == nullptr)
714 return false;
715 if (!force &&
716 (node->getIsProtected() ||
717 node->getLocked()))
718 return false;
719
720 onNodeRemoved(*node);
721 emit nodeRemoved(node);
722 if (_selectedNodes.contains(node))
723 _selectedNodes.removeAll(node);
724 return super_t::remove_node(node); // warning node pointer now invalid
725}
726
727int Graph::getNodeCount() const noexcept { return super_t::get_node_count(); }
728

Callers

nothing calls this directly

Calls 4

getIsProtectedMethod · 0.45
getLockedMethod · 0.45
containsMethod · 0.45
removeAllMethod · 0.45

Tested by

no test coverage detected