Commit 7475606a authored by Ilkka Ollakka's avatar Ilkka Ollakka

Qt4: PLItem cleanup

parent 8df85173
......@@ -77,20 +77,17 @@ void PLItem::init( playlist_item_t *_playlist_item, PLItem *parent, PLModel *m,
else if ( i_showflags >= COLUMN_END )
i_showflags = COLUMN_END - 1; /* show everything */
updateColumnHeaders();
}
}
else
{
i_showflags = parentItem->i_showflags;
//Add empty string and update() handles data appending
}
}
/*
Constructors
Call the above function init
So far the first constructor isn't used...
*/
PLItem::PLItem( playlist_item_t *p_item, PLItem *parent, PLModel *m )
{
......@@ -109,12 +106,6 @@ PLItem::~PLItem()
children.clear();
}
/* Column manager */
void PLItem::updateColumnHeaders()
{
assert( i_showflags < COLUMN_END );
}
/* So far signal is always true.
Using signal false would not call PLModel... Why ?
*/
......@@ -149,13 +140,6 @@ int PLItem::row() const
}
/* update the PL Item, get the good names and so on */
/* This function may not be the best way to do it
It destroys everything and gets everything again instead of just
building the necessary columns.
This does extra work if you re-display the same column. Slower...
On the other hand, this way saves memory.
There must be a more clever way.
*/
void PLItem::update( playlist_item_t *p_item, bool iscurrent )
{
assert( p_item->p_input->i_id == i_input_id );
......
......@@ -40,7 +40,6 @@ class PLItem
{
friend class PLModel;
public:
PLItem( int, int, bool, PLItem *parent , PLModel * );
PLItem( playlist_item_t *, PLItem *parent, PLModel * );
PLItem( playlist_item_t *, QSettings *, PLModel * );
~PLItem();
......@@ -74,7 +73,6 @@ protected:
private:
void init( playlist_item_t *, PLItem *, PLModel *, QSettings * );
void updateColumnHeaders();
PLItem *parentItem;
PLModel *model;
};
......
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