mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 08:04:25 +02:00
Initialize ViewManager before SourcesModel
This commit is contained in:
@@ -77,9 +77,8 @@ TomahawkDesktopWindow::TomahawkDesktopWindow( QWidget* parent )
|
||||
, m_searchWidget( 0 )
|
||||
, m_audioControls( new AudioControls( this ) )
|
||||
{
|
||||
ViewManager* vm = new ViewManager( this );
|
||||
connect( vm, SIGNAL( showQueueRequested() ), SLOT( showQueue() ) );
|
||||
connect( vm, SIGNAL( hideQueueRequested() ), SLOT( hideQueue() ) );
|
||||
connect( ViewManager::instance(), SIGNAL( showQueueRequested() ), SLOT( showQueue() ) );
|
||||
connect( ViewManager::instance(), SIGNAL( hideQueueRequested() ), SLOT( hideQueue() ) );
|
||||
|
||||
ui->setupUi( this );
|
||||
applyPlatformTweaks();
|
||||
@@ -96,7 +95,7 @@ TomahawkDesktopWindow::TomahawkDesktopWindow( QWidget* parent )
|
||||
|
||||
// set initial state
|
||||
onSipDisconnected();
|
||||
vm->setQueue( m_queueView );
|
||||
ViewManager::instance()->setQueue( m_queueView );
|
||||
ViewManager::instance()->showWelcomePage();
|
||||
}
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include "tomahawktrayicon.h"
|
||||
#include "tomahawkapp.h"
|
||||
#include "sourcetree/sourcesmodel.h"
|
||||
#include "viewmanager.h"
|
||||
|
||||
#include <QCloseEvent>
|
||||
|
||||
@@ -37,6 +38,9 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
||||
{
|
||||
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
|
||||
|
||||
if( !ViewManager::instance() )
|
||||
new ViewManager( this );
|
||||
|
||||
if( !s_sourcesModel )
|
||||
s_sourcesModel = new SourcesModel( this );
|
||||
}
|
||||
|
Reference in New Issue
Block a user