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

* Extra (optional) CTOR param for RecentlyPlayedModel: maxItems.

This commit is contained in:
Christian Muehlhaeuser
2013-06-08 06:08:23 +02:00
parent 55ad6c2a6a
commit e31d6ac0a7
2 changed files with 3 additions and 3 deletions

View File

@@ -34,9 +34,9 @@
using namespace Tomahawk;
RecentlyPlayedModel::RecentlyPlayedModel( QObject* parent )
RecentlyPlayedModel::RecentlyPlayedModel( QObject* parent, unsigned int maxItems )
: PlaylistModel( parent )
, m_limit( HISTORY_TRACK_ITEMS )
, m_limit( maxItems > 0 ? maxItems : HISTORY_TRACK_ITEMS )
{
}

View File

@@ -32,7 +32,7 @@ class DLLEXPORT RecentlyPlayedModel : public PlaylistModel
Q_OBJECT
public:
explicit RecentlyPlayedModel( QObject* parent = 0 );
explicit RecentlyPlayedModel( QObject* parent = 0, unsigned int maxItems = 0 );
~RecentlyPlayedModel();
unsigned int limit() const { return m_limit; }