mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 17:05:36 -04:00
Basic JobQueue implementation
This commit is contained in:
parent
191f37f5fa
commit
04743eb4be
7 changed files with 114 additions and 5 deletions
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "viewpages/ViewStep.h"
|
||||
#include "InstallationViewStep.h"
|
||||
#include "JobQueue.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QLabel>
|
||||
|
@ -152,6 +153,10 @@ ViewManager::next()
|
|||
m_steps.at( m_currentStep )->onActivate();
|
||||
installing = m_steps.at( m_currentStep ) == m_installationViewStep;
|
||||
emit currentStepChanged();
|
||||
if ( installing )
|
||||
{
|
||||
startInstallation();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -186,4 +191,14 @@ ViewManager::back()
|
|||
m_back->setEnabled( false );
|
||||
}
|
||||
|
||||
void
|
||||
ViewManager::startInstallation()
|
||||
{
|
||||
for( ViewStep* step : m_prepareSteps )
|
||||
{
|
||||
JobQueue::instance()->enqueue( step->jobs() );
|
||||
}
|
||||
JobQueue::instance()->start();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue