On Sun, Aug 16, 2009 at 2:21 PM, git version control <span dir="ltr"><<a href="mailto:git@videolan.org">git@videolan.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
vlc | branch: master | Ilkka Ollakka <<a href="mailto:ileoo@videolan.org">ileoo@videolan.org</a>> | Sun Aug 16 15:21:18 2009 +0300| [f85eafb452522edd362fa162ef082e17226398ec] | committer: Ilkka Ollakka<br>
<br>
qt4: remove b_is_node and use childCount() > 0 instead in playlist_model<br>
</blockquote></div><br>This commit is wrong: playlist_item_t->i_children > -1 is not equal to childCount() > 0!<br>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!<br>
<br>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.<br>