Fixes for loading modules by phase.

main
Teo Mrnjavac 11 years ago
parent 7ac6588090
commit 84bfb2aa95

@ -28,7 +28,6 @@
#include "utils/Logger.h"
#include "JobQueue.h"
#include "Settings.h"
#include "ViewManager.h"
CalamaresApplication::CalamaresApplication( int& argc, char *argv[] )
@ -149,16 +148,19 @@ CalamaresApplication::onPluginsReady()
{
initJobQueue();
m_mainwindow = new CalamaresWindow();
m_mainwindow = new CalamaresWindow(); //also creates ViewManager
m_moduleManager->loadModules( Calamares::Prepare );
connect( m_moduleManager, &Calamares::ModuleManager::modulesLoaded, [this]
connect( m_moduleManager, &Calamares::ModuleManager::modulesLoaded,
[this]( Calamares::Phase phase )
{
m_mainwindow->show();
if ( phase == Calamares::Prepare )
{
m_mainwindow->show();
//TODO: move somewhere
ProgressTreeModel* m = new ProgressTreeModel( this );
ProgressTreeView::instance()->setModel( m );
ProgressTreeModel* m = new ProgressTreeModel( this );
ProgressTreeView::instance()->setModel( m );
}
});
}

@ -67,8 +67,6 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
CalamaresUtils::unmarginLayout( sideLayout );
CalamaresUtils::unmarginLayout( mainLayout );
//This should create a PageManager or ViewManager or whatever, which
//should control the sidebar, next/back buttons and QSW.
Calamares::ViewManager* vm = new Calamares::ViewManager( this );
mainLayout->addWidget( vm->centralWidget() );

@ -88,7 +88,7 @@ ModuleManager::loadModules( Phase phase )
}
recursiveLoad( moduleName );
}
emit modulesLoaded();
emit modulesLoaded( phase );
// Loading sequence:
// 1) deps are already fine. check if we have all the modules needed by the roster
// 2) ask ModuleManager to load them from the list provided by Settings

@ -52,7 +52,7 @@ public:
signals:
void initDone();
void modulesLoaded();
void modulesLoaded( Phase );
private slots:
void doInit();

Loading…
Cancel
Save