1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-19 23:39:42 +01:00

Fetch charts data on the event loop to prevent a strange deadlock on startup.

This commit is contained in:
Casey Link 2011-08-29 23:40:02 -05:00
parent 7f324bc45c
commit bf03b7b756
2 changed files with 13 additions and 7 deletions

View File

@ -96,6 +96,18 @@ WhatsHotWidget::WhatsHotWidget( QWidget* parent )
connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
QTimer::singleShot(0, this, SLOT(fetchData()));
}
WhatsHotWidget::~WhatsHotWidget()
{
delete ui;
}
void
WhatsHotWidget::fetchData()
{
Tomahawk::InfoSystem::InfoCriteriaHash artistInfo;
Tomahawk::InfoSystem::InfoRequestData requestData;
@ -108,17 +120,10 @@ WhatsHotWidget::WhatsHotWidget( QWidget* parent )
requestData.type = Tomahawk::InfoSystem::InfoChartTracks;
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
tDebug() << "WhatsHot: requested InfoChartArtists+Tracks";
}
WhatsHotWidget::~WhatsHotWidget()
{
delete ui;
}
void
WhatsHotWidget::checkQueries()
{

View File

@ -75,6 +75,7 @@ signals:
public slots:
private slots:
void fetchData();
void checkQueries();
void infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output );
void infoSystemFinished( QString target );