mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
[libcalamaresui] Move requirements information out of welcome module.
- Move type and rename it; put in Calamares namespace - Emit signals from the viewmanager as results come in - Remove state changing from welcome view step based on its internal requirements checking (for now this breaks progressing past the welcome page) - Log checking of the requirements
This commit is contained in:
parent
24e04645b6
commit
27b921bde1
12 changed files with 106 additions and 37 deletions
|
@ -318,14 +318,27 @@ ModuleManager::loadModules()
|
|||
void
|
||||
ModuleManager::checkRequirements()
|
||||
{
|
||||
cDebug() << "Checking module requirements ..";
|
||||
QTimer::singleShot( 0, this, [ this ]()
|
||||
{
|
||||
bool acceptable = true;
|
||||
|
||||
for (const auto& module : m_loadedModulesByInstanceKey )
|
||||
{
|
||||
module->checkRequirements();
|
||||
auto l = module->checkRequirements();
|
||||
if ( l.length() > 0 )
|
||||
{
|
||||
cDebug() << " .." << module->name() << l.length() << "requirements";
|
||||
emit requirementsResult( l );
|
||||
}
|
||||
for (const auto& r : l)
|
||||
{
|
||||
if (r.required && !r.checked)
|
||||
acceptable = false;
|
||||
}
|
||||
}
|
||||
|
||||
emit modulesChecked();
|
||||
emit requirementsComplete( acceptable );
|
||||
} );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue