[vlc-devel] [PATCH 12/18] gui/qt: use vlc_playlist_locker in PLModel::renameNode

Filip Roséen filip at videolabs.io
Wed Jul 20 04:37:02 CEST 2016


---
 modules/gui/qt/components/playlist/playlist_model.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index 7fd669f..0366ac2 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -901,13 +901,13 @@ void PLModel::renameNode( QModelIndex index, QString name )
 {
     if( name.isEmpty() || !index.isValid() ) return;
 
-    PL_LOCK;
+    vlc_playlist_locker pl_lock ( THEPL );
+
     if ( !index.isValid() ) index = rootIndex();
     input_item_t* p_input = this->getInputItem( index );
     input_item_SetName( p_input, qtu( name ) );
     playlist_t *p_playlist = THEPL;
     input_item_WriteMeta( VLC_OBJECT(p_playlist), p_input );
-    PL_UNLOCK;
 }
 
 bool PLModel::action( QAction *action, const QModelIndexList &indexes )
-- 
2.9.0



More information about the vlc-devel mailing list