]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/standardpanel.cpp
Use pl_Locked and pl_Unlocked
[vlc] / modules / gui / qt4 / components / playlist / standardpanel.cpp
index a8b0cf09e0d354c0eef165b9d2e0663466b4ede6..6bea1c92d463ddce4de2d39cd19d51119b5430d5 100644 (file)
@@ -63,8 +63,8 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
     /* Create and configure the QTreeView */
     view = new QVLCTreeView( 0 );
     view->setSortingEnabled( true );
-    view->sortByColumn( -1, Qt::AscendingOrder );
-    view->setModel(model);
+    view->sortByColumn( , Qt::AscendingOrder );
+    view->setModel( model );
     view->setIconSize( QSize( 20, 20 ) );
     view->setAlternatingRowColors( true );
     view->setAnimated( true );
@@ -315,11 +315,14 @@ void StandardPLPanel::doPopup( QModelIndex index, QPoint point )
 /* This activated by the selector selection */
 void StandardPLPanel::setRoot( int i_root_id )
 {
+    QPL_LOCK;
     playlist_item_t *p_item = playlist_ItemGetById( THEPL, i_root_id,
-                                                    true );
+                                                    pl_Locked );
     assert( p_item );
     p_item = playlist_GetPreferredNode( THEPL, p_item );
     assert( p_item );
+    QPL_UNLOCK;
+
     model->rebuild( p_item );
 }