vlc_linux/vlc-3.0.16/modules/gui/qt/components/playlist/playlist_model.cpp
/* This function must be entered WITH the playlist lock */
This function must be entered WITH the playlist lock
This function must be entered WITH the playlist lock
void PLModel::updateChildren( playlist_item_t *p_node, PLItem *root )
{
    for( int i = 0; i < p_node->i_children ; i++ )
    {
        if( p_node->pp_children[i]->i_flags & PLAYLIST_DBL_FLAG ) continue;
        PLItem *newItem =  new PLItem( p_node->pp_children[i], root );
        root->appendChild( newItem );
        if( p_node->pp_children[i]->i_children != -1 )
            updateChildren( p_node->pp_children[i], newItem );
    }
}
void PLModel :: updateChildren ( playlist_item_t * p_node , PLItem * root ) { for ( int i = 0 ; i < p_node -> i_children ; i ++ ) { if ( p_node -> pp_children [ i ] -> i_flags & PLAYLIST_DBL_FLAG ) continue ; PLItem * newItem = new PLItem ( p_node -> pp_children [ i ] , root ) ; root -> appendChild ( newItem ) ; if ( p_node -> pp_children [ i ] -> i_children != -1 ) updateChildren ( p_node -> pp_children [ i ] , newItem ) ; } }
This function must be entered WITH the playlist lock
This function must be entered WITH the playlist lock