1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-07-31 11:20:22 +02:00

* Fixed warnings and added itemCountChanged( uint ) signal to PlayableModel.

This commit is contained in:
Christian Muehlhaeuser
2012-05-31 21:28:37 +02:00
parent 751f029564
commit bff7f01e22
2 changed files with 10 additions and 0 deletions

View File

@@ -210,6 +210,7 @@ PlayableModel::queryData( const query_ptr& query, int column, int role ) const
break; break;
case AlbumPos: case AlbumPos:
{
QString tPos; QString tPos;
if ( query->albumpos() != 0 ) 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() ) ) return QString( "%1.%2" ).arg( QString::number( query->discnumber() ) )
.arg( tPos ); .arg( tPos );
} }
}
break;
default:
break; break;
} }
if ( query->numResults() ) if ( query->numResults() )
@@ -251,6 +256,9 @@ PlayableModel::queryData( const query_ptr& query, int column, int role ) const
case Score: case Score:
return query->results().first()->score(); return query->results().first()->score();
break; break;
default:
break;
} }
} }

View File

@@ -81,6 +81,7 @@ public:
virtual void setIcon( const QPixmap& pixmap ) { m_icon = pixmap; } virtual void setIcon( const QPixmap& pixmap ) { m_icon = pixmap; }
virtual int trackCount() const { return rowCount( QModelIndex() ); } virtual int trackCount() const { return rowCount( QModelIndex() ); }
virtual int itemCount() const { return rowCount( QModelIndex() ); }
virtual int rowCount( const QModelIndex& parent ) const; virtual int rowCount( const QModelIndex& parent ) const;
virtual int columnCount( const QModelIndex& parent = QModelIndex() ) const; virtual int columnCount( const QModelIndex& parent = QModelIndex() ) const;
@@ -117,6 +118,7 @@ signals:
void shuffleModeChanged( bool enabled ); void shuffleModeChanged( bool enabled );
void trackCountChanged( unsigned int tracks ); void trackCountChanged( unsigned int tracks );
void itemCountChanged( unsigned int items );
void loadingStarted(); void loadingStarted();
void loadingFinished(); void loadingFinished();