|
|
|
|
@ -22,6 +22,7 @@
|
|
|
|
|
|
|
|
|
|
#include "gui/PartitionViewStep.h"
|
|
|
|
|
|
|
|
|
|
#include "core/Config.h"
|
|
|
|
|
#include "core/DeviceModel.h"
|
|
|
|
|
#include "core/KPMHelpers.h"
|
|
|
|
|
#include "core/OsproberEntry.h"
|
|
|
|
|
@ -64,11 +65,11 @@
|
|
|
|
|
|
|
|
|
|
PartitionViewStep::PartitionViewStep( QObject* parent )
|
|
|
|
|
: Calamares::ViewStep( parent )
|
|
|
|
|
, m_config( new Config( this ) )
|
|
|
|
|
, m_core( nullptr )
|
|
|
|
|
, m_widget( new QStackedWidget() )
|
|
|
|
|
, m_choicePage( nullptr )
|
|
|
|
|
, m_manualPartitionPage( nullptr )
|
|
|
|
|
, m_requiredStorageGiB( 0.0 )
|
|
|
|
|
{
|
|
|
|
|
m_widget->setContentsMargins( 0, 0, 0, 0 );
|
|
|
|
|
|
|
|
|
|
@ -385,13 +386,7 @@ PartitionViewStep::isAtEnd() const
|
|
|
|
|
void
|
|
|
|
|
PartitionViewStep::onActivate()
|
|
|
|
|
{
|
|
|
|
|
// If there's no setting (e.g. from the welcome page) for required storage
|
|
|
|
|
// then use ours, if it was set.
|
|
|
|
|
auto* gs = Calamares::JobQueue::instance() ? Calamares::JobQueue::instance()->globalStorage() : nullptr;
|
|
|
|
|
if ( m_requiredStorageGiB >= 0.0 && gs && !gs->contains( "requiredStorageGiB" ) )
|
|
|
|
|
{
|
|
|
|
|
gs->insert( "requiredStorageGiB", m_requiredStorageGiB );
|
|
|
|
|
}
|
|
|
|
|
m_config->updateGlobalStorage();
|
|
|
|
|
|
|
|
|
|
// if we're coming back to PVS from the next VS
|
|
|
|
|
if ( m_widget->currentWidget() == m_choicePage && m_choicePage->currentChoice() == ChoicePage::Alongside )
|
|
|
|
|
@ -525,6 +520,8 @@ PartitionViewStep::onLeave()
|
|
|
|
|
void
|
|
|
|
|
PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|
|
|
|
{
|
|
|
|
|
m_config->setConfigurationMap( configurationMap );
|
|
|
|
|
|
|
|
|
|
// Copy the efiSystemPartition setting to the global storage. It is needed not only in
|
|
|
|
|
// the EraseDiskPage, but also in the bootloader configuration modules (grub, bootloader).
|
|
|
|
|
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
|
|
|
|
|
@ -635,9 +632,6 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|
|
|
|
|
|
|
|
|
m_swapChoices = choices;
|
|
|
|
|
|
|
|
|
|
// Settings that overlap with the Welcome module
|
|
|
|
|
m_requiredStorageGiB = CalamaresUtils::getDouble( configurationMap, "requiredStorage", -1.0 );
|
|
|
|
|
|
|
|
|
|
// These gs settings seem to be unused (in upstream Calamares) outside of
|
|
|
|
|
// the partition module itself.
|
|
|
|
|
gs->insert( "ensureSuspendToDisk", ensureSuspendToDisk );
|
|
|
|
|
|