[vlc-devel] commit: Qt4: use vlc_list_children ( Rémi Denis-Courmont )

git version control git at videolan.org
Fri May 16 17:41:20 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Fri May 16 18:23:34 2008 +0300| [8bd5461783c149200b3b2a7da15e02d14a612275]

Qt4: use vlc_list_children

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

 modules/gui/qt4/dialogs/messages.cpp |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
index ca3f1cb..74ac7be 100644
--- a/modules/gui/qt4/dialogs/messages.cpp
+++ b/modules/gui/qt4/dialogs/messages.cpp
@@ -199,7 +199,6 @@ void MessagesDialog::updateLog()
 void MessagesDialog::buildTree( QTreeWidgetItem *parentItem,
                                 vlc_object_t *p_obj )
 {
-    vlc_object_yield( p_obj );
     QTreeWidgetItem *item;
 
     if( parentItem )
@@ -217,12 +216,11 @@ void MessagesDialog::buildTree( QTreeWidgetItem *parentItem,
 
     item->setExpanded( true );
 
-    for( int i=0; i < p_obj->i_children; i++ )
-    {
-        buildTree( item, p_obj->pp_children[i]);
-    }
-
+    vlc_list_t *l = vlc_list_children( p_obj );
     vlc_object_release( p_obj );
+
+    for( int i=0; i < l->i_count; i++ )
+        buildTree( item, l->p_values[i].p_object );
 }
 
 void MessagesDialog::clearOrUpdate()
@@ -237,6 +235,7 @@ void MessagesDialog::updateTree()
 {
     modulesTree->clear();
 
+    vlc_object_yield( p_intf->p_libvlc );
     buildTree( NULL, VLC_OBJECT( p_intf->p_libvlc ) );
 }
 




More information about the vlc-devel mailing list