mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Fixed warnings and added itemCountChanged( uint ) signal to PlayableModel.
This commit is contained in:
@@ -210,6 +210,7 @@ PlayableModel::queryData( const query_ptr& query, int column, int role ) const
|
||||
break;
|
||||
|
||||
case AlbumPos:
|
||||
{
|
||||
QString tPos;
|
||||
if ( query->albumpos() != 0 )
|
||||
{
|
||||
@@ -220,6 +221,10 @@ PlayableModel::queryData( const query_ptr& query, int column, int role ) const
|
||||
return QString( "%1.%2" ).arg( QString::number( query->discnumber() ) )
|
||||
.arg( tPos );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if ( query->numResults() )
|
||||
@@ -251,6 +256,9 @@ PlayableModel::queryData( const query_ptr& query, int column, int role ) const
|
||||
case Score:
|
||||
return query->results().first()->score();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -81,6 +81,7 @@ public:
|
||||
virtual void setIcon( const QPixmap& pixmap ) { m_icon = pixmap; }
|
||||
|
||||
virtual int trackCount() const { return rowCount( QModelIndex() ); }
|
||||
virtual int itemCount() const { return rowCount( QModelIndex() ); }
|
||||
|
||||
virtual int rowCount( const QModelIndex& parent ) const;
|
||||
virtual int columnCount( const QModelIndex& parent = QModelIndex() ) const;
|
||||
@@ -117,6 +118,7 @@ signals:
|
||||
void shuffleModeChanged( bool enabled );
|
||||
|
||||
void trackCountChanged( unsigned int tracks );
|
||||
void itemCountChanged( unsigned int items );
|
||||
|
||||
void loadingStarted();
|
||||
void loadingFinished();
|
||||
|
Reference in New Issue
Block a user