mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-01 14:42:25 +02:00
* Resolved a bunch more hidden overloaded virtual methods in PlayableModel.
This commit is contained in:
parent
a9bf18e17f
commit
0c00cccc1f
@ -576,20 +576,6 @@ PlayableModel::queries() const
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
void
|
||||
PlayableModel::insertInternal( const T& item, int row )
|
||||
{
|
||||
if ( item.isNull() )
|
||||
return;
|
||||
|
||||
QList< T > list;
|
||||
list << item;
|
||||
|
||||
insert( list, row );
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
PlayableModel::insertInternal( const QList< T >& items, int row )
|
||||
@ -828,84 +814,102 @@ PlayableModel::itemFromIndex( const QModelIndex& index ) const
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::append( const Tomahawk::artist_ptr& artist )
|
||||
PlayableModel::appendArtist( const Tomahawk::artist_ptr& artist )
|
||||
{
|
||||
insert( artist, rowCount( QModelIndex() ) );
|
||||
QList< artist_ptr > artists;
|
||||
artists << artist;
|
||||
|
||||
appendArtists( artists );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::append( const Tomahawk::album_ptr& album )
|
||||
PlayableModel::appendAlbum( const Tomahawk::album_ptr& album )
|
||||
{
|
||||
insert( album, rowCount( QModelIndex() ) );
|
||||
QList< album_ptr > albums;
|
||||
albums << album;
|
||||
|
||||
appendAlbums( albums );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::append( const Tomahawk::query_ptr& query )
|
||||
PlayableModel::appendQuery( const Tomahawk::query_ptr& query )
|
||||
{
|
||||
insert( query, rowCount( QModelIndex() ) );
|
||||
QList< query_ptr > queries;
|
||||
queries << query;
|
||||
|
||||
appendQueries( queries );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::append( const QList< Tomahawk::artist_ptr >& artists )
|
||||
PlayableModel::appendArtists( const QList< Tomahawk::artist_ptr >& artists )
|
||||
{
|
||||
insert( artists, rowCount( QModelIndex() ) );
|
||||
insertArtists( artists, rowCount( QModelIndex() ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::append( const QList< Tomahawk::album_ptr >& albums )
|
||||
PlayableModel::appendAlbums( const QList< Tomahawk::album_ptr >& albums )
|
||||
{
|
||||
insert( albums, rowCount( QModelIndex() ) );
|
||||
insertAlbums( albums, rowCount( QModelIndex() ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::append( const QList< Tomahawk::query_ptr >& queries )
|
||||
PlayableModel::appendQueries( const QList< Tomahawk::query_ptr >& queries )
|
||||
{
|
||||
insert( queries, rowCount( QModelIndex() ) );
|
||||
insertQueries( queries, rowCount( QModelIndex() ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::insert( const Tomahawk::artist_ptr& artist, int row )
|
||||
PlayableModel::insertArtist( const Tomahawk::artist_ptr& artist, int row )
|
||||
{
|
||||
insertInternal( artist, row );
|
||||
QList< artist_ptr > artists;
|
||||
artists << artist;
|
||||
|
||||
insertArtists( artists, row );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::insert( const Tomahawk::album_ptr& album, int row )
|
||||
PlayableModel::insertAlbum( const Tomahawk::album_ptr& album, int row )
|
||||
{
|
||||
insertInternal( album, row );
|
||||
QList< album_ptr > albums;
|
||||
albums << album;
|
||||
|
||||
insertAlbums( albums, row );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::insert( const Tomahawk::query_ptr& query, int row )
|
||||
PlayableModel::insertQuery( const Tomahawk::query_ptr& query, int row )
|
||||
{
|
||||
insertInternal( query, row );
|
||||
QList< query_ptr > queries;
|
||||
queries << query;
|
||||
|
||||
insertQueries( queries, row );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::insert( const QList< Tomahawk::artist_ptr >& artists, int row )
|
||||
PlayableModel::insertArtists( const QList< Tomahawk::artist_ptr >& artists, int row )
|
||||
{
|
||||
insertInternal( artists, row );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::insert( const QList< Tomahawk::album_ptr >& albums, int row )
|
||||
PlayableModel::insertAlbums( const QList< Tomahawk::album_ptr >& albums, int row )
|
||||
{
|
||||
insertInternal( albums, row );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlayableModel::insert( const QList< Tomahawk::query_ptr >& queries, int row )
|
||||
PlayableModel::insertQueries( const QList< Tomahawk::query_ptr >& queries, int row )
|
||||
{
|
||||
insertInternal( queries, row );
|
||||
}
|
||||
|
@ -136,19 +136,19 @@ public slots:
|
||||
|
||||
virtual void clear();
|
||||
|
||||
virtual void append( const QList< Tomahawk::query_ptr >& queries );
|
||||
virtual void append( const QList< Tomahawk::artist_ptr >& artists );
|
||||
virtual void append( const QList< Tomahawk::album_ptr >& albums );
|
||||
virtual void append( const Tomahawk::query_ptr& query );
|
||||
virtual void append( const Tomahawk::artist_ptr& artist );
|
||||
virtual void append( const Tomahawk::album_ptr& album );
|
||||
virtual void appendQueries( const QList< Tomahawk::query_ptr >& queries );
|
||||
virtual void appendArtists( const QList< Tomahawk::artist_ptr >& artists );
|
||||
virtual void appendAlbums( const QList< Tomahawk::album_ptr >& albums );
|
||||
virtual void appendQuery( const Tomahawk::query_ptr& query );
|
||||
virtual void appendArtist( const Tomahawk::artist_ptr& artist );
|
||||
virtual void appendAlbum( const Tomahawk::album_ptr& album );
|
||||
|
||||
virtual void insert( const QList< Tomahawk::query_ptr >& queries, int row = 0 );
|
||||
virtual void insert( const QList< Tomahawk::artist_ptr >& artists, int row = 0 );
|
||||
virtual void insert( const QList< Tomahawk::album_ptr >& albums, int row = 0 );
|
||||
virtual void insert( const Tomahawk::query_ptr& query, int row = 0 );
|
||||
virtual void insert( const Tomahawk::artist_ptr& artist, int row = 0 );
|
||||
virtual void insert( const Tomahawk::album_ptr& album, int row = 0 );
|
||||
virtual void insertQueries( const QList< Tomahawk::query_ptr >& queries, int row = 0 );
|
||||
virtual void insertArtists( const QList< Tomahawk::artist_ptr >& artists, int row = 0 );
|
||||
virtual void insertAlbums( const QList< Tomahawk::album_ptr >& albums, int row = 0 );
|
||||
virtual void insertQuery( const Tomahawk::query_ptr& query, int row = 0 );
|
||||
virtual void insertArtist( const Tomahawk::artist_ptr& artist, int row = 0 );
|
||||
virtual void insertAlbum( const Tomahawk::album_ptr& album, int row = 0 );
|
||||
|
||||
virtual void remove( int row, bool moreToCome = false );
|
||||
virtual void removeIndex( const QModelIndex& index, bool moreToCome = false );
|
||||
@ -170,8 +170,6 @@ private slots:
|
||||
private:
|
||||
template <typename T>
|
||||
void insertInternal( const QList< T >& items, int row );
|
||||
template <typename T>
|
||||
void insertInternal( const T& item, int row );
|
||||
|
||||
Qt::Alignment columnAlignment( int column ) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user