[vlc-commits] gui/qt: use vlc_mutex_locker instead of explicit lock/unlock

Filip Roséen git at videolan.org
Tue Jan 10 15:31:24 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Tue Jan 10 13:52:36 2017 +0100| [5ab4f49fc3f033c77c36d60fb36e8815c16961cc] | committer: Thomas Guillem

gui/qt: use vlc_mutex_locker instead of explicit lock/unlock

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5ab4f49fc3f033c77c36d60fb36e8815c16961cc
---

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

diff --git a/modules/gui/qt/components/info_panels.cpp b/modules/gui/qt/components/info_panels.cpp
index ed7d4a6..15defe8 100644
--- a/modules/gui/qt/components/info_panels.cpp
+++ b/modules/gui/qt/components/info_panels.cpp
@@ -497,7 +497,8 @@ void InfoPanel::update( input_item_t *p_item)
     QTreeWidgetItem *current_item = NULL;
     QTreeWidgetItem *child_item = NULL;
 
-    vlc_mutex_lock( &p_item->lock );
+    vlc_mutex_locker locker( &p_item->lock );
+
     for( int i = 0; i< p_item->i_categories ; i++)
     {
         current_item = new QTreeWidgetItem();
@@ -516,7 +517,6 @@ void InfoPanel::update( input_item_t *p_item)
         }
         InfoTree->setItemExpanded( current_item, true);
     }
-    vlc_mutex_unlock( &p_item->lock );
 }
 
 /**



More information about the vlc-commits mailing list