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:
parent
7f324bc45c
commit
bf03b7b756
@ -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()
|
||||
{
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user