[vlc-devel] vlc playlist development in general (was: [PATCH] QT4 playlist: even better DragNDrop policy)

Jakob Leben jakob.leben at gmail.com
Wed Aug 12 10:36:40 CEST 2009


On ti 11. elokuuta 2009 19.54.07, Jakob Leben wrote:
> Essentially, what you do when subclassing QAbstractItemModel is not
creating
> a(nother) model, but just implementing functions through which the view
gets
> data from wherever you have it stored.

On Wed, Aug 12, 2009 at 9:50 AM, Ilkka Ollakka
<ilkka.ollakka+vlc at oamk.fi<ilkka.ollakka%2Bvlc at oamk.fi>
> wrote:

> Actually playlist_model is allready subclassed from QAbstractItemModel,
> but data-handling is maybe littlebit suboptimal
>

Yes, and it's a pity that it had to implement it's own model (class PLItem).
I presume that was (is) needed just because it had to store playlist item
ID's instead of playlist item pointers. So there we have this kind of
duplication of data: some data is stored twice, once in playlist_item_t and
again in PLItem, just so that the latter doesn't need to PL_LOCK and search
for data everytime it needs it.
If it was not for that ID abstraction from playlist_item then PLModel could
do away with PLItem, I believe.

Another thing is of course the lack of handy and optimal helper functions in
vlc_playlist.h, which is the reason for some unnecessary searching for data
(array transversals) and similar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090812/651fc16c/attachment.html>


More information about the vlc-devel mailing list