void ContainerNode::destructChildren(const QDomElement &element, BuildState &state) { QPtrListIterator< ContainerNode > childIt(children); while(childIt.current()) { ContainerNode *childNode = childIt.current(); QDomElement childElement = findElementForChild(element, childNode); // destruct returns true in case the container really got deleted if(childNode->destruct(childElement, state)) removeChild(childNode); else ++childIt; } }