[vlc-devel] commit: qt4: remove basicly empty PLItem:: update and refactor playlist_model UpdateTreeItem-methods (Ilkka Ollakka )

git version control git at videolan.org
Sun Aug 16 18:56:43 CEST 2009


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Aug 16 17:47:10 2009 +0300| [37f2e0086acc2f06925ff8f46a53a9191abc6465] | committer: Ilkka Ollakka 

qt4: remove basicly empty PLItem::update and refactor playlist_model UpdateTreeItem-methods

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

 .../gui/qt4/components/playlist/playlist_item.cpp  |    7 -------
 .../gui/qt4/components/playlist/playlist_item.hpp  |    2 --
 .../gui/qt4/components/playlist/playlist_model.cpp |   13 ++-----------
 .../gui/qt4/components/playlist/playlist_model.hpp |    1 -
 4 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_item.cpp b/modules/gui/qt4/components/playlist/playlist_item.cpp
index 6330427..6e78871 100644
--- a/modules/gui/qt4/components/playlist/playlist_item.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_item.cpp
@@ -102,10 +102,3 @@ int PLItem::row() const
     return 0;
 }
 
-/* update the PL Item, get the good names and so on */
-void PLItem::update( playlist_item_t *p_item )
-{
-    assert( p_item->p_input == p_input);
-
-}
-
diff --git a/modules/gui/qt4/components/playlist/playlist_item.hpp b/modules/gui/qt4/components/playlist/playlist_item.hpp
index 8ccfb09..33554f3 100644
--- a/modules/gui/qt4/components/playlist/playlist_item.hpp
+++ b/modules/gui/qt4/components/playlist/playlist_item.hpp
@@ -59,8 +59,6 @@ public:
 
     PLItem *parent() { return parentItem; };
 
-    void update( playlist_item_t * );
-
 protected:
     QList<PLItem*> children;
     int i_id;
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 659cd50..cf82484 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -723,7 +723,7 @@ void PLModel::ProcessItemAppend( const playlist_add_t *p_add )
     nodeItem->appendChild( newItem );
     emit endInsertRows();
     emit layoutChanged();
-    UpdateTreeItem( p_item, newItem, true );
+    UpdateTreeItem( newItem, true );
 end:
     PL_UNLOCK;
     return;
@@ -772,8 +772,7 @@ void PLModel::rebuild( playlist_item_t *p_root )
                                            p_item->p_input->i_id );
         if( currentItem )
         {
-            UpdateTreeItem( p_item, currentItem,
-                            true, false );
+            UpdateTreeItem( currentItem, true, false );
         }
     }
     else
@@ -816,19 +815,11 @@ void PLModel::UpdateNodeChildren( playlist_item_t *p_node, PLItem *root )
 void PLModel::UpdateTreeItem( PLItem *item, bool signal, bool force )
 {
     playlist_item_t *p_item = playlist_ItemGetById( p_playlist, item->i_id );
-    UpdateTreeItem( p_item, item, signal, force );
-}
-
-/* This function must be entered WITH the playlist lock */
-void PLModel::UpdateTreeItem( playlist_item_t *p_item, PLItem *item,
-                              bool signal, bool force )
-{
     if ( !p_item )
         return;
     if( !force && i_depth == DEPTH_SEL && p_item->p_parent &&
                                  p_item->p_parent->i_id != rootItem->i_id )
         return;
-    item->update( p_item );
     if( signal )
         emit dataChanged( index( item, 0 ) , index( item, columnCount( QModelIndex() ) ) );
 }
diff --git a/modules/gui/qt4/components/playlist/playlist_model.hpp b/modules/gui/qt4/components/playlist/playlist_model.hpp
index 6a84f83..359471b 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.hpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.hpp
@@ -146,7 +146,6 @@ private:
     void ProcessItemAppend( const playlist_add_t *p_add );
 
     void UpdateTreeItem( PLItem *, bool, bool force = false );
-    void UpdateTreeItem( playlist_item_t *, PLItem *, bool, bool forc = false );
     void UpdateNodeChildren( PLItem * );
     void UpdateNodeChildren( playlist_item_t *, PLItem * );
 




More information about the vlc-devel mailing list