[vlc-devel] Qt4 gui playlist

Jakob Leben jakob.leben at gmail.com
Wed Jul 29 11:38:29 CEST 2009


Hello all!

I would like to solve something that I consider a bug in qt4 interface
playlist: when moving items around, the order of items moved gets messed up.
This is because the new order firstly depends on the order of item selection
before moving and secondly this order gets reversed upon inserting items
back at new position. Another problem is that it is not possible to move
items right to the beginning of the playlist.

I have just found a way to solve those problems and I did it on my copy of
the 1.0.0 code.

Before I present my changes I would like to consult all of you other
developers about one thing: in PLModel::dropMimeData() the insertion of
moved items is not atomic. Instead, PL_LOCK and PL_UNLOCK is called
before/after insertion of every single element. This complicates
implementation to some degree plus allowing other threads to modify playlist
during the process of moving items opens the possibility for the move
operation to fail or at the worst case messes with the order of insertion
again.

I would like to know your opinion about making the process of moving items
atomic, meaning that PL_LOCK and PL_UNLOCK is called only once before and
after the process as a whole.

Best regards,
Jakob Leben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090729/e0aa8239/attachment.html>


More information about the vlc-devel mailing list