Fixes for loading modules by phase.
This commit is contained in:
parent
7ac6588090
commit
84bfb2aa95
@ -28,7 +28,6 @@
|
|||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "ViewManager.h"
|
|
||||||
|
|
||||||
|
|
||||||
CalamaresApplication::CalamaresApplication( int& argc, char *argv[] )
|
CalamaresApplication::CalamaresApplication( int& argc, char *argv[] )
|
||||||
@ -149,16 +148,19 @@ CalamaresApplication::onPluginsReady()
|
|||||||
{
|
{
|
||||||
initJobQueue();
|
initJobQueue();
|
||||||
|
|
||||||
m_mainwindow = new CalamaresWindow();
|
m_mainwindow = new CalamaresWindow(); //also creates ViewManager
|
||||||
|
|
||||||
m_moduleManager->loadModules( Calamares::Prepare );
|
m_moduleManager->loadModules( Calamares::Prepare );
|
||||||
connect( m_moduleManager, &Calamares::ModuleManager::modulesLoaded, [this]
|
connect( m_moduleManager, &Calamares::ModuleManager::modulesLoaded,
|
||||||
|
[this]( Calamares::Phase phase )
|
||||||
|
{
|
||||||
|
if ( phase == Calamares::Prepare )
|
||||||
{
|
{
|
||||||
m_mainwindow->show();
|
m_mainwindow->show();
|
||||||
|
|
||||||
//TODO: move somewhere
|
|
||||||
ProgressTreeModel* m = new ProgressTreeModel( this );
|
ProgressTreeModel* m = new ProgressTreeModel( this );
|
||||||
ProgressTreeView::instance()->setModel( m );
|
ProgressTreeView::instance()->setModel( m );
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +67,6 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
|||||||
CalamaresUtils::unmarginLayout( sideLayout );
|
CalamaresUtils::unmarginLayout( sideLayout );
|
||||||
CalamaresUtils::unmarginLayout( mainLayout );
|
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 );
|
Calamares::ViewManager* vm = new Calamares::ViewManager( this );
|
||||||
|
|
||||||
mainLayout->addWidget( vm->centralWidget() );
|
mainLayout->addWidget( vm->centralWidget() );
|
||||||
|
@ -88,7 +88,7 @@ ModuleManager::loadModules( Phase phase )
|
|||||||
}
|
}
|
||||||
recursiveLoad( moduleName );
|
recursiveLoad( moduleName );
|
||||||
}
|
}
|
||||||
emit modulesLoaded();
|
emit modulesLoaded( phase );
|
||||||
// Loading sequence:
|
// Loading sequence:
|
||||||
// 1) deps are already fine. check if we have all the modules needed by the roster
|
// 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
|
// 2) ask ModuleManager to load them from the list provided by Settings
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void initDone();
|
void initDone();
|
||||||
void modulesLoaded();
|
void modulesLoaded( Phase );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void doInit();
|
void doInit();
|
||||||
|
Loading…
Reference in New Issue
Block a user