1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-08 07:07:05 +02:00

* Removed obsolete CTOR param model in PlayableItem.

This commit is contained in:
Christian Muehlhaeuser
2012-11-15 15:49:26 +01:00
parent e6e2e228b4
commit 82113c516f
3 changed files with 4 additions and 7 deletions

View File

@@ -43,7 +43,7 @@ PlayableItem::~PlayableItem()
} }
PlayableItem::PlayableItem( PlayableItem* parent, QAbstractItemModel* model ) PlayableItem::PlayableItem( PlayableItem* parent )
{ {
init( parent ); init( parent );
} }
@@ -130,8 +130,6 @@ PlayableItem::init( PlayableItem* parent, int row )
{ {
parent->children.insert( row, this ); parent->children.insert( row, this );
} }
this->model = parent->model;
} }
if ( !m_query.isNull() ) if ( !m_query.isNull() )

View File

@@ -34,7 +34,7 @@ Q_OBJECT
public: public:
~PlayableItem(); ~PlayableItem();
explicit PlayableItem( PlayableItem* parent = 0, QAbstractItemModel* model = 0 ); explicit PlayableItem( PlayableItem* parent = 0 );
explicit PlayableItem( const Tomahawk::artist_ptr& artist, PlayableItem* parent = 0, int row = -1 ); explicit PlayableItem( const Tomahawk::artist_ptr& artist, PlayableItem* parent = 0, int row = -1 );
explicit PlayableItem( const Tomahawk::album_ptr& album, PlayableItem* parent = 0, int row = -1 ); explicit PlayableItem( const Tomahawk::album_ptr& album, PlayableItem* parent = 0, int row = -1 );
explicit PlayableItem( const Tomahawk::result_ptr& result, PlayableItem* parent = 0, int row = -1 ); explicit PlayableItem( const Tomahawk::result_ptr& result, PlayableItem* parent = 0, int row = -1 );
@@ -61,7 +61,6 @@ public:
QList<PlayableItem*> children; QList<PlayableItem*> children;
QPersistentModelIndex index; QPersistentModelIndex index;
QAbstractItemModel* model;
signals: signals:
void dataChanged(); void dataChanged();

View File

@@ -39,7 +39,7 @@ using namespace Tomahawk;
PlayableModel::PlayableModel( QObject* parent, bool loading ) PlayableModel::PlayableModel( QObject* parent, bool loading )
: QAbstractItemModel( parent ) : QAbstractItemModel( parent )
, m_rootItem( new PlayableItem( 0, this ) ) , m_rootItem( new PlayableItem( 0 ) )
, m_readOnly( true ) , m_readOnly( true )
, m_loading( loading ) , m_loading( loading )
{ {
@@ -499,7 +499,7 @@ PlayableModel::clear()
emit beginResetModel(); emit beginResetModel();
delete m_rootItem; delete m_rootItem;
m_rootItem = 0; m_rootItem = 0;
m_rootItem = new PlayableItem( 0, this ); m_rootItem = new PlayableItem( 0 );
emit endResetModel(); emit endResetModel();
} }
} }