TreeNode* Feed::next() { if ( nextSibling() ) return nextSibling(); Folder* p = parent(); while (p) { if ( p->nextSibling() ) return p->nextSibling(); else p = p->parent(); } return 0; }
TreeNode* Folder::next() { if ( firstChild() ) return firstChild(); if ( nextSibling() ) return nextSibling(); Folder* p = parent(); while (p) { if ( p->nextSibling() ) return p->nextSibling(); else p = p->parent(); } return 0; }