]> git.sesse.net Git - vlc/commitdiff
qt4: remove basicly empty PLItem::update and refactor playlist_model UpdateTreeItem...
authorIlkka Ollakka <ileoo@videolan.org>
Sun, 16 Aug 2009 14:47:10 +0000 (17:47 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Sun, 16 Aug 2009 14:49:30 +0000 (17:49 +0300)
modules/gui/qt4/components/playlist/playlist_item.cpp
modules/gui/qt4/components/playlist/playlist_item.hpp
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.hpp

index 63304275d9493d0ed1e7678dd15b9d68bd370f76..6e78871986bb66cc550a7978320cbdfbab55b2a9 100644 (file)
@@ -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);
-
-}
-
index 8ccfb0932e36a6ae6ba98f2a8311046d1df12590..33554f31e80ce4b4c442c760af2907cde7284a3e 100644 (file)
@@ -59,8 +59,6 @@ public:
 
     PLItem *parent() { return parentItem; };
 
-    void update( playlist_item_t * );
-
 protected:
     QList<PLItem*> children;
     int i_id;
index 659cd50ff5d623f02f616311c8c63f3fa736638f..cf824841b91b565d952a7d654c900447093fb19e 100644 (file)
@@ -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() ) ) );
 }
index 6a84f83358429fce0054bdd9f739cc6f4609a29c..359471b29139928117599d8e09bab192b2665d17 100644 (file)
@@ -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 * );