[vlc-devel] [vlc-commits] commit: Qt: Playlist drag and drop corrections (Jakob Leben )

Jakob Leben jakob.leben at gmail.com
Mon Mar 8 12:56:30 CET 2010

2010/3/8 Rémi Denis-Courmont <remi at remlab.net>

> On Mon,  8 Mar 2010 12:02:53 +0100 (CET), git at videolan.org wrote:
> > vlc | branch: master | Jakob Leben <jleben at videolan.org> | Mon Mar  8
> > 11:56:45 2010 +0100| [4bd42ef61b011eeb2f016354df9767bd75a5e1df] |
> > committer: Jakob Leben
> >
> > Qt: Playlist drag and drop corrections
> >
> > - Use item ids instead of pointers for drag data to prevent usage after
> > freeing.
> No way. ID are deprecated and broken by design. Pierre and I have spent
> enough hours getting rid of them. Please revert this.

Previously, the drag data consisted of PLItem *, which is the worst option,
since they might be freed while dragging.
Do you agree then on using playlist_item_t *? Those are never freed until
the playlist is, but we can check if they are still in the
playlist_t->all_items array.
Unfortunately, we cannot use input_item_t*, because if we incref them, I
don't see any way in Qt to make sure they are decrefed after drag operation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100308/3f51763a/attachment.html>

More information about the vlc-devel mailing list