Commit f85eafb4 authored by Ilkka Ollakka's avatar Ilkka Ollakka

qt4: remove b_is_node and use childCount() > 0 instead in playlist_model

parent 2c3bac1e
...@@ -54,7 +54,6 @@ void PLItem::init( playlist_item_t *_playlist_item, PLItem *parent, PLModel *m, ...@@ -54,7 +54,6 @@ void PLItem::init( playlist_item_t *_playlist_item, PLItem *parent, PLModel *m,
i_id = _playlist_item->i_id; /* Playlist item specific id */ i_id = _playlist_item->i_id; /* Playlist item specific id */
model = m; /* PLModel (QAbsmodel) */ model = m; /* PLModel (QAbsmodel) */
i_type = -1; /* Item type - Avoid segfault */ i_type = -1; /* Item type - Avoid segfault */
b_is_node = _playlist_item->i_children > -1;
p_input = _playlist_item->p_input; p_input = _playlist_item->p_input;
vlc_gc_incref( p_input ); vlc_gc_incref( p_input );
...@@ -144,7 +143,6 @@ void PLItem::update( playlist_item_t *p_item ) ...@@ -144,7 +143,6 @@ void PLItem::update( playlist_item_t *p_item )
/* Useful for the model */ /* Useful for the model */
i_type = p_item->p_input->i_type; i_type = p_item->p_input->i_type;
b_is_node = p_item->i_children > -1;
i_showflags = parentItem ? parentItem->i_showflags : i_showflags; i_showflags = parentItem ? parentItem->i_showflags : i_showflags;
} }
......
...@@ -66,7 +66,6 @@ protected: ...@@ -66,7 +66,6 @@ protected:
int i_type; int i_type;
int i_id; int i_id;
int i_showflags; int i_showflags;
bool b_is_node;
input_item_t *p_input; input_item_t *p_input;
private: private:
......
...@@ -146,7 +146,7 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const ...@@ -146,7 +146,7 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
} }
else else
{ {
if ( item->b_is_node && if ( (item->childCount() > 0) &&
( rootItem->p_input == pl_input || ( rootItem->p_input == pl_input ||
rootItem->p_input == ml_input ) ) rootItem->p_input == ml_input ) )
flags |= Qt::ItemIsDropEnabled; flags |= Qt::ItemIsDropEnabled;
......
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