diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index 8aec1a3bd..c7053a432 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -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 ); + } }); } diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index e9847f109..109d644d4 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -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() ); diff --git a/src/libcalamaresui/modulesystem/ModuleManager.cpp b/src/libcalamaresui/modulesystem/ModuleManager.cpp index 7b7131357..616d070f9 100644 --- a/src/libcalamaresui/modulesystem/ModuleManager.cpp +++ b/src/libcalamaresui/modulesystem/ModuleManager.cpp @@ -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 diff --git a/src/libcalamaresui/modulesystem/ModuleManager.h b/src/libcalamaresui/modulesystem/ModuleManager.h index e35c1274f..89e27b5ba 100644 --- a/src/libcalamaresui/modulesystem/ModuleManager.h +++ b/src/libcalamaresui/modulesystem/ModuleManager.h @@ -52,7 +52,7 @@ public: signals: void initDone(); - void modulesLoaded(); + void modulesLoaded( Phase ); private slots: void doInit();