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

* Don't pre-initialize the charts widget. This will require some more changes in WhatsHotWidget - to be discussed with Hugo.

This commit is contained in:
Christian Muehlhaeuser
2013-01-09 07:06:37 +01:00
parent c832e63c59
commit 453c0ab0c4

View File

@@ -74,7 +74,7 @@ ViewManager::ViewManager( QObject* parent )
: QObject( parent ) : QObject( parent )
, m_widget( new QWidget() ) , m_widget( new QWidget() )
, m_welcomeWidget( new WelcomeWidget() ) , m_welcomeWidget( new WelcomeWidget() )
, m_whatsHotWidget( new WhatsHotWidget() ) , m_whatsHotWidget( 0 )
, m_newReleasesWidget( new NewReleasesWidget() ) , m_newReleasesWidget( new NewReleasesWidget() )
, m_recentPlaysWidget( 0 ) , m_recentPlaysWidget( 0 )
, m_currentPage( 0 ) , m_currentPage( 0 )
@@ -109,7 +109,6 @@ ViewManager::ViewManager( QObject* parent )
connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( applyFilter() ) ); connect( &m_filterTimer, SIGNAL( timeout() ), SLOT( applyFilter() ) );
connect( m_infobar, SIGNAL( filterTextChanged( QString ) ), SLOT( setFilter( QString ) ) ); connect( m_infobar, SIGNAL( filterTextChanged( QString ) ), SLOT( setFilter( QString ) ) );
connect( this, SIGNAL( tomahawkLoaded() ), m_whatsHotWidget, SLOT( fetchData() ) );
connect( this, SIGNAL( tomahawkLoaded() ), m_newReleasesWidget, SLOT( fetchData() ) ); connect( this, SIGNAL( tomahawkLoaded() ), m_newReleasesWidget, SLOT( fetchData() ) );
connect( this, SIGNAL( tomahawkLoaded() ), m_welcomeWidget, SLOT( loadData() ) ); connect( this, SIGNAL( tomahawkLoaded() ), m_welcomeWidget, SLOT( loadData() ) );
@@ -376,6 +375,12 @@ ViewManager::showWelcomePage()
Tomahawk::ViewPage* Tomahawk::ViewPage*
ViewManager::showWhatsHotPage() ViewManager::showWhatsHotPage()
{ {
if ( !m_whatsHotWidget )
{
m_whatsHotWidget = new WhatsHotWidget();
m_whatsHotWidget->fetchData();
}
return show( m_whatsHotWidget ); return show( m_whatsHotWidget );
} }