[vlc-devel] commit: qt4: remove b_is_node and use childCount() > 0 instead in playlist_model (Ilkka Ollakka )
git version control
git at videolan.org
Sun Aug 16 14:21:37 CEST 2009
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Aug 16 15:21:18 2009 +0300| [f85eafb452522edd362fa162ef082e17226398ec] | committer: Ilkka Ollakka
qt4: remove b_is_node and use childCount() > 0 instead in playlist_model
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f85eafb452522edd362fa162ef082e17226398ec
---
.../gui/qt4/components/playlist/playlist_item.cpp | 2 --
.../gui/qt4/components/playlist/playlist_item.hpp | 1 -
.../gui/qt4/components/playlist/playlist_model.cpp | 2 +-
3 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_item.cpp b/modules/gui/qt4/components/playlist/playlist_item.cpp
index f160328..6c0c3a3 100644
--- a/modules/gui/qt4/components/playlist/playlist_item.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_item.cpp
@@ -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 */
model = m; /* PLModel (QAbsmodel) */
i_type = -1; /* Item type - Avoid segfault */
- b_is_node = _playlist_item->i_children > -1;
p_input = _playlist_item->p_input;
vlc_gc_incref( p_input );
@@ -144,7 +143,6 @@ void PLItem::update( playlist_item_t *p_item )
/* Useful for the model */
i_type = p_item->p_input->i_type;
- b_is_node = p_item->i_children > -1;
i_showflags = parentItem ? parentItem->i_showflags : i_showflags;
}
diff --git a/modules/gui/qt4/components/playlist/playlist_item.hpp b/modules/gui/qt4/components/playlist/playlist_item.hpp
index c8cb2c6..c5734f3 100644
--- a/modules/gui/qt4/components/playlist/playlist_item.hpp
+++ b/modules/gui/qt4/components/playlist/playlist_item.hpp
@@ -66,7 +66,6 @@ protected:
int i_type;
int i_id;
int i_showflags;
- bool b_is_node;
input_item_t *p_input;
private:
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 8b3606b..91a1c7e 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -146,7 +146,7 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
}
else
{
- if ( item->b_is_node &&
+ if ( (item->childCount() > 0) &&
( rootItem->p_input == pl_input ||
rootItem->p_input == ml_input ) )
flags |= Qt::ItemIsDropEnabled;
More information about the vlc-devel
mailing list