Commit 776639f8 authored by Christophe Mutricy's avatar Christophe Mutricy

Qt4: Fix compilation

Seems to works but i would appreciate a review by a playlist guru
parent e0197392
...@@ -585,6 +585,7 @@ void PLModel::rebuild() ...@@ -585,6 +585,7 @@ void PLModel::rebuild()
void PLModel::rebuild( playlist_item_t *p_root ) void PLModel::rebuild( playlist_item_t *p_root )
{ {
playlist_item_t* p_item;
/* Remove callbacks before locking to avoid deadlocks */ /* Remove callbacks before locking to avoid deadlocks */
delCallbacks(); delCallbacks();
/* Invalidate cache */ /* Invalidate cache */
...@@ -611,13 +612,13 @@ void PLModel::rebuild( playlist_item_t *p_root ) ...@@ -611,13 +612,13 @@ void PLModel::rebuild( playlist_item_t *p_root )
assert( rootItem ); assert( rootItem );
/* Recreate from root */ /* Recreate from root */
UpdateNodeChildren( rootItem ); UpdateNodeChildren( rootItem );
if( p_playlist->status.p_item ) if( p_item=playlist_CurrentPlayingItem(p_playlist) )
{ {
PLItem *currentItem = FindByInput( rootItem, PLItem *currentItem = FindByInput( rootItem,
p_playlist->status.p_item->p_input->i_id ); p_item->p_input->i_id );
if( currentItem ) if( currentItem )
{ {
UpdateTreeItem( p_playlist->status.p_item, currentItem, UpdateTreeItem( p_item, currentItem,
true, false ); true, false );
} }
} }
...@@ -667,7 +668,7 @@ void PLModel::UpdateTreeItem( playlist_item_t *p_item, PLItem *item, ...@@ -667,7 +668,7 @@ void PLModel::UpdateTreeItem( playlist_item_t *p_item, PLItem *item,
if( !force && i_depth == DEPTH_SEL && p_item->p_parent && if( !force && i_depth == DEPTH_SEL && p_item->p_parent &&
p_item->p_parent->i_id != rootItem->i_id ) p_item->p_parent->i_id != rootItem->i_id )
return; return;
item->update( p_item, p_item == p_playlist->status.p_item ); item->update( p_item, p_item == playlist_CurrentPlayingItem( p_playlist ) );
if( signal ) if( signal )
emit dataChanged( index( item, 0 ) , index( item, 1 ) ); emit dataChanged( index( item, 0 ) , index( item, 1 ) );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment