mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Only connect to InfoSystem on demand.
This commit is contained in:
@@ -82,13 +82,6 @@ Album::Album( unsigned int id, const QString& name, const Tomahawk::artist_ptr&
|
|||||||
, m_cover( 0 )
|
, m_cover( 0 )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
|
||||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
|
||||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
|
||||||
|
|
||||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
|
||||||
SIGNAL( finished( QString ) ),
|
|
||||||
SLOT( infoSystemFinished( QString ) ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -131,6 +124,14 @@ Album::cover( const QSize& size, bool forceLoad ) const
|
|||||||
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( trackInfo );
|
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( trackInfo );
|
||||||
requestData.customData = QVariantMap();
|
requestData.customData = QVariantMap();
|
||||||
|
|
||||||
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||||
|
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||||
|
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||||
|
|
||||||
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||||
|
SIGNAL( finished( QString ) ),
|
||||||
|
SLOT( infoSystemFinished( QString ) ) );
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,6 +191,12 @@ Album::infoSystemFinished( QString target )
|
|||||||
if ( target != m_uuid )
|
if ( target != m_uuid )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
disconnect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||||
|
this, SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||||
|
|
||||||
|
disconnect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ),
|
||||||
|
this, SLOT( infoSystemFinished( QString ) ) );
|
||||||
|
|
||||||
m_infoLoaded = true;
|
m_infoLoaded = true;
|
||||||
emit updated();
|
emit updated();
|
||||||
}
|
}
|
||||||
|
@@ -82,14 +82,6 @@ Artist::Artist( unsigned int id, const QString& name )
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
m_sortname = DatabaseImpl::sortname( name, true );
|
m_sortname = DatabaseImpl::sortname( name, true );
|
||||||
|
|
||||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
|
||||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
|
||||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
|
||||||
|
|
||||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
|
||||||
SIGNAL( finished( QString ) ),
|
|
||||||
SLOT( infoSystemFinished( QString ) ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -122,6 +114,14 @@ Artist::cover( const QSize& size, bool forceLoad ) const
|
|||||||
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( trackInfo );
|
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( trackInfo );
|
||||||
requestData.customData = QVariantMap();
|
requestData.customData = QVariantMap();
|
||||||
|
|
||||||
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||||
|
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||||
|
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||||
|
|
||||||
|
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||||
|
SIGNAL( finished( QString ) ),
|
||||||
|
SLOT( infoSystemFinished( QString ) ) );
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,6 +181,12 @@ Artist::infoSystemFinished( QString target )
|
|||||||
if ( target != m_uuid )
|
if ( target != m_uuid )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
disconnect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||||
|
this, SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||||
|
|
||||||
|
disconnect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ),
|
||||||
|
this, SLOT( infoSystemFinished( QString ) ) );
|
||||||
|
|
||||||
m_infoLoaded = true;
|
m_infoLoaded = true;
|
||||||
emit updated();
|
emit updated();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user