void BinTreeNodeReader::readList(qint32 token,ProtocolTreeNode& node,QDataStream& in) { int size = readListSize(token,in); for (int i=0; i<size; i++) { ProtocolTreeNode child; nextTreeInternal(child,in); node.addChild(child); } }
bool BinTreeNodeReader::readList(qint32 token,ProtocolTreeNode& node) { int size = 0; if (!readListSize(token, size)) { qDebug() << "failed to read listSize"; return false; } for (int i=0; i<size; i++) { ProtocolTreeNode child; //TODO: check results nextTreeInternal(child); node.addChild(child); } return true; }