[vlc-devel] commit: qt4: remove b_is_node and use childCount() > 0 instead in playlist_model (Ilkka Ollakka )
jakob.leben at gmail.com
Mon Aug 17 21:52:38 CEST 2009
On Sun, Aug 16, 2009 at 2:21 PM, git version control <git at videolan.org>wrote:
> vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Aug 16
> 15:21:18 2009 +0300| [f85eafb452522edd362fa162ef082e17226398ec] | committer:
> Ilkka Ollakka
> qt4: remove b_is_node and use childCount() > 0 instead in playlist_model
This commit is wrong: playlist_item_t->i_children > -1 is not equal to
childCount() > 0!
The former tells us if the item is of node type or not. But an item can be
node and still have i_children == 0, hence childCount() == 0! And vice
versa, a PLItem can have childCount() == 0, but not be a node!
The problem is that checking playlist_item_t->i_children demands
playlist-locking, but locking inside PLModel::flags() when we need this
information results in a deadlock - tested. That was the reason for storing
the information as PLItem::b_is_node and updating it when playlist_item_t
changes to node.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel