|
|
|
@ -31,7 +31,6 @@
|
|
|
|
|
#include <gui/PartitionPage.h>
|
|
|
|
|
#include <gui/ReplacePage.h>
|
|
|
|
|
#include <gui/PartitionPreview.h>
|
|
|
|
|
#include "OsproberEntry.h"
|
|
|
|
|
|
|
|
|
|
#include "CalamaresVersion.h"
|
|
|
|
|
#include "utils/CalamaresUtilsGui.h"
|
|
|
|
@ -71,6 +70,49 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
|
|
|
|
|
timer->setSingleShot( true );
|
|
|
|
|
connect( timer, &QTimer::timeout,
|
|
|
|
|
[=]()
|
|
|
|
|
{
|
|
|
|
|
OsproberEntryList osproberEntries = runOsprober();
|
|
|
|
|
|
|
|
|
|
m_choicePage->init( m_core, osproberEntries );
|
|
|
|
|
m_erasePage->init( m_core );
|
|
|
|
|
m_alongsidePage->init( m_core, osproberEntries );
|
|
|
|
|
|
|
|
|
|
m_widget->addWidget( m_choicePage );
|
|
|
|
|
m_widget->addWidget( m_manualPartitionPage );
|
|
|
|
|
m_widget->addWidget( m_alongsidePage );
|
|
|
|
|
m_widget->addWidget( m_erasePage );
|
|
|
|
|
m_widget->addWidget( m_replacePage );
|
|
|
|
|
m_widget->removeWidget( waitingWidget );
|
|
|
|
|
waitingWidget->deleteLater();
|
|
|
|
|
|
|
|
|
|
timer->deleteLater();
|
|
|
|
|
} );
|
|
|
|
|
timer->start( 0 );
|
|
|
|
|
|
|
|
|
|
connect( m_core, &PartitionCoreModule::hasRootMountPointChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
connect( m_choicePage, &ChoicePage::nextStatusChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
connect( m_erasePage, &EraseDiskPage::nextStatusChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
connect( m_alongsidePage, &AlongsidePage::nextStatusChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
connect( m_replacePage, &ReplacePage::nextStatusChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PartitionViewStep::~PartitionViewStep()
|
|
|
|
|
{
|
|
|
|
|
if ( m_choicePage && m_choicePage->parent() == nullptr )
|
|
|
|
|
m_choicePage->deleteLater();
|
|
|
|
|
if ( m_manualPartitionPage && m_manualPartitionPage->parent() == nullptr )
|
|
|
|
|
m_manualPartitionPage->deleteLater();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OsproberEntryList
|
|
|
|
|
PartitionViewStep::runOsprober()
|
|
|
|
|
{
|
|
|
|
|
QString osproberOutput;
|
|
|
|
|
QProcess osprober;
|
|
|
|
@ -116,43 +158,10 @@ PartitionViewStep::PartitionViewStep( QObject* parent )
|
|
|
|
|
}
|
|
|
|
|
osProberReport.append( osproberCleanLines.join( '\n' ) );
|
|
|
|
|
cDebug() << osProberReport;
|
|
|
|
|
Calamares::JobQueue::instance()->globalStorage()->insert( "osproberLines", osproberCleanLines );
|
|
|
|
|
|
|
|
|
|
m_choicePage->init( m_core, osproberEntries );
|
|
|
|
|
m_erasePage->init( m_core );
|
|
|
|
|
m_alongsidePage->init( m_core, osproberEntries );
|
|
|
|
|
|
|
|
|
|
m_widget->addWidget( m_choicePage );
|
|
|
|
|
m_widget->addWidget( m_manualPartitionPage );
|
|
|
|
|
m_widget->addWidget( m_alongsidePage );
|
|
|
|
|
m_widget->addWidget( m_erasePage );
|
|
|
|
|
m_widget->addWidget( m_replacePage );
|
|
|
|
|
m_widget->removeWidget( waitingWidget );
|
|
|
|
|
waitingWidget->deleteLater();
|
|
|
|
|
|
|
|
|
|
timer->deleteLater();
|
|
|
|
|
} );
|
|
|
|
|
timer->start( 0 );
|
|
|
|
|
|
|
|
|
|
connect( m_core, &PartitionCoreModule::hasRootMountPointChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
connect( m_choicePage, &ChoicePage::nextStatusChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
connect( m_erasePage, &EraseDiskPage::nextStatusChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
connect( m_alongsidePage, &AlongsidePage::nextStatusChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
connect( m_replacePage, &ReplacePage::nextStatusChanged,
|
|
|
|
|
this, &PartitionViewStep::nextStatusChanged );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Calamares::JobQueue::instance()->globalStorage()->insert( "osproberLines", osproberCleanLines );
|
|
|
|
|
|
|
|
|
|
PartitionViewStep::~PartitionViewStep()
|
|
|
|
|
{
|
|
|
|
|
if ( m_choicePage && m_choicePage->parent() == nullptr )
|
|
|
|
|
m_choicePage->deleteLater();
|
|
|
|
|
if ( m_manualPartitionPage && m_manualPartitionPage->parent() == nullptr )
|
|
|
|
|
m_manualPartitionPage->deleteLater();
|
|
|
|
|
return osproberEntries;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|