From a97f4771d61acd0d97ac4f3163e7414e070b7ef3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sun, 5 Apr 2020 00:06:50 +0200 Subject: [PATCH] [calamares] Fix test-loader for modules after ViewManager API - The ViewManager needs to be told when loading is done now (because of the quit-at-end settings) See 7393198f7bdba5b4539a842dde54c34555cc269e --- src/calamares/testmain.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/calamares/testmain.cpp b/src/calamares/testmain.cpp index 8dcf41faa..cd06c5d03 100644 --- a/src/calamares/testmain.cpp +++ b/src/calamares/testmain.cpp @@ -229,7 +229,7 @@ main( int argc, char* argv[] ) std::unique_ptr< Calamares::JobQueue > jobqueue_p( new Calamares::JobQueue( nullptr ) ); QMainWindow* mw = nullptr; - auto gs = jobqueue_p->globalStorage(); + auto* gs = jobqueue_p->globalStorage(); if ( !module.globalConfigFile().isEmpty() ) { gs->loadYaml( module.globalConfigFile() ); @@ -241,7 +241,6 @@ main( int argc, char* argv[] ) gs->insert( "localeConf", vm ); } - cDebug() << "Calamares module-loader testing" << module.moduleName(); Calamares::Module* m = load_module( module ); if ( !m ) @@ -273,7 +272,9 @@ main( int argc, char* argv[] ) if ( mw ) { - QWidget* w = Calamares::ViewManager::instance()->currentStep()->widget(); + auto* vm = Calamares::ViewManager::instance(); + vm->onInitComplete(); + QWidget* w = vm->currentStep()->widget(); w->setParent( mw ); mw->setCentralWidget( w ); w->show();