mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 00:24:12 +02:00
Merge remote-tracking branch 'origin/master' into tweetsip
This commit is contained in:
@@ -49,6 +49,22 @@ TrackProxyModel::setFilter( const QString& pattern )
|
||||
}
|
||||
|
||||
|
||||
QList< Tomahawk::query_ptr >
|
||||
TrackProxyModel::tracks()
|
||||
{
|
||||
QList<Tomahawk::query_ptr> queries;
|
||||
|
||||
for ( int i = 0; i < rowCount( QModelIndex() ); i++ )
|
||||
{
|
||||
PlItem* item = itemFromIndex( mapToSource( index( i, 0 ) ) );
|
||||
if ( item )
|
||||
queries << item->query();
|
||||
}
|
||||
|
||||
return queries;
|
||||
}
|
||||
|
||||
|
||||
Tomahawk::result_ptr
|
||||
TrackProxyModel::siblingItem( int itemsAway )
|
||||
{
|
||||
|
@@ -21,7 +21,7 @@ public:
|
||||
virtual QPersistentModelIndex currentItem() const { return mapFromSource( m_model->currentItem() ); }
|
||||
virtual void setCurrentItem( const QModelIndex& index ) { m_model->setCurrentItem( mapToSource( index ) ); }
|
||||
|
||||
virtual QList<Tomahawk::query_ptr> tracks() { Q_ASSERT( FALSE ); QList<Tomahawk::query_ptr> queries; return queries; }
|
||||
virtual QList<Tomahawk::query_ptr> tracks();
|
||||
|
||||
virtual int unfilteredTrackCount() const { return sourceModel()->rowCount( QModelIndex() ); }
|
||||
virtual int trackCount() const { return rowCount( QModelIndex() ); }
|
||||
|
Reference in New Issue
Block a user