]> 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 d420ac0e518e54bcbbba5be13bb679347784da5b..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 );
@@ -267,9 +267,8 @@ void StandardPLPanel::popupSelectColumn( QPoint pos )
 
     QMenu selectColMenu;
 
-    char *psz_title;
 #define ADD_META_ACTION( meta ) {                                              \
-    QAction* option = selectColMenu.addAction( psz_column_title( meta ) );     \
+    QAction* option = selectColMenu.addAction( qfu( psz_column_title( meta ) ) );     \
     option->setCheckable( true );                                              \
     option->setChecked( model->shownFlags() & meta );                          \
     ContextUpdateMapper->setMapping( option, meta );                           \
@@ -316,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 );
 }