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

* Renamed infoLoaded() to coverLoaded().

This commit is contained in:
Christian Muehlhaeuser
2012-05-27 17:33:46 +02:00
parent 33cae66d95
commit 9d064f7689
2 changed files with 8 additions and 9 deletions

View File

@@ -82,8 +82,8 @@ Artist::Artist( unsigned int id, const QString& name )
: QObject() : QObject()
, m_id( id ) , m_id( id )
, m_name( name ) , m_name( name )
, m_infoLoaded( false ) , m_coverLoaded( false )
, m_infoLoading( false ) , m_coverLoading( false )
, m_simArtistsLoaded( false ) , m_simArtistsLoaded( false )
, m_infoJobs( 0 ) , m_infoJobs( 0 )
#ifndef ENABLE_HEADLESS #ifndef ENABLE_HEADLESS
@@ -295,7 +295,7 @@ Artist::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVari
if ( ba.length() ) if ( ba.length() )
{ {
m_coverBuffer = ba; m_coverBuffer = ba;
m_infoLoaded = true; m_coverLoaded = true;
emit coverChanged(); emit coverChanged();
} }
} }
@@ -348,7 +348,7 @@ Artist::infoSystemFinished( QString target )
QPixmap QPixmap
Artist::cover( const QSize& size, bool forceLoad ) const Artist::cover( const QSize& size, bool forceLoad ) const
{ {
if ( !m_infoLoaded && !m_infoLoading ) if ( !m_coverLoaded && !m_coverLoading )
{ {
if ( !forceLoad ) if ( !forceLoad )
return QPixmap(); return QPixmap();
@@ -374,7 +374,7 @@ Artist::cover( const QSize& size, bool forceLoad ) const
m_infoJobs++; m_infoJobs++;
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData ); Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
m_infoLoading = true; m_coverLoading = true;
} }
if ( !m_cover && !m_coverBuffer.isEmpty() ) if ( !m_cover && !m_coverBuffer.isEmpty() )

View File

@@ -49,8 +49,6 @@ public:
QString name() const { return m_name; } QString name() const { return m_name; }
QString sortname() const { return m_sortname; } QString sortname() const { return m_sortname; }
bool infoLoaded() const { return m_infoLoaded; }
QList<Tomahawk::album_ptr> albums( ModelMode mode = Mixed, const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr() ) const; QList<Tomahawk::album_ptr> albums( ModelMode mode = Mixed, const Tomahawk::collection_ptr& collection = Tomahawk::collection_ptr() ) const;
QList<Tomahawk::artist_ptr> similarArtists() const; QList<Tomahawk::artist_ptr> similarArtists() const;
@@ -65,6 +63,7 @@ public:
#ifndef ENABLE_HEADLESS #ifndef ENABLE_HEADLESS
QPixmap cover( const QSize& size, bool forceLoad = true ) const; QPixmap cover( const QSize& size, bool forceLoad = true ) const;
#endif #endif
bool coverLoaded() const { return m_coverLoaded; }
Tomahawk::playlistinterface_ptr playlistInterface(); Tomahawk::playlistinterface_ptr playlistInterface();
@@ -94,8 +93,8 @@ private:
QString m_name; QString m_name;
QString m_sortname; QString m_sortname;
bool m_infoLoaded; bool m_coverLoaded;
mutable bool m_infoLoading; mutable bool m_coverLoading;
QHash<Tomahawk::ModelMode, bool> m_albumsLoaded; QHash<Tomahawk::ModelMode, bool> m_albumsLoaded;
bool m_simArtistsLoaded; bool m_simArtistsLoaded;