<div class="gmail_quote">On Mon, Feb 1, 2010 at 3:47 PM, Jakob Leben <span dir="ltr"><<a href="mailto:jakob.leben@gmail.com">jakob.leben@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div class="im">On Mon, Feb 1, 2010 at 12:36 PM, Laurent Aimar <span dir="ltr"><<a href="mailto:fenrir@via.ecp.fr" target="_blank">fenrir@via.ecp.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hi,<br>
<br>
On Mon, Feb 01, 2010, Jakob Leben wrote:<br>
>    Hi all!<br>
><br>
> +void input_item_BeginAddSubItems( input_item_t *p_item )<br>
> +{<br>
> +  vlc_event_t event;<br>
> +  event.type = vlc_InputItemBeginAddSubItems;<br>
> +  vlc_event_send( &p_item->event_manager, &event );<br>
> +}<br>
> +<br>
> +void input_item_EndAddSubItems( input_item_t *p_item )<br>
> +{<br>
> +  vlc_event_t event;<br>
> +  event.type = vlc_InputItemEndAddSubItems;<br>
> +  vlc_event_send( &p_item->event_manager, &event );<br>
> +}<br>
<br>
 They are a call to future bugs (way too easy to forget them<br>
or to break when moving arround code).<br></blockquote></div><div><br>Another idea was to have an event that reports for all the new children together, so modules should create an array and pass that in the event.<br></div>
</div></blockquote><div><br> in Qt, when you subclass QAbstractItemModel, you notify the view about new items with beginInsert( ) and endInsert( ) calls, between which you actually insert new items into the model. That is where I got the idea from. But ok, copying is also not the best argument :)<br>
<br>So, do you propose to go the other way and have one event for all the children grouped in an array?</div></div>