[welcome] [partition] Rename GlobalStorage variable used for storage

- Change name passed into GS to use "GiB" instead of "GB", for
   consistency. This needs to be done in consumers as well.
This commit is contained in:
Adriaan de Groot 2019-05-06 16:39:14 +02:00
parent 599b34c70e
commit 502d43d111
4 changed files with 6 additions and 6 deletions

View File

@ -284,7 +284,7 @@ canBeReplaced( Partition* candidate )
bool ok = false; bool ok = false;
double requiredStorageGB = Calamares::JobQueue::instance() double requiredStorageGB = Calamares::JobQueue::instance()
->globalStorage() ->globalStorage()
->value( "requiredStorageGB" ) ->value( "requiredStorageGiB" )
.toDouble( &ok ); .toDouble( &ok );
qint64 availableStorageB = candidate->capacity(); qint64 availableStorageB = candidate->capacity();
@ -356,7 +356,7 @@ canBeResized( Partition* candidate )
bool ok = false; bool ok = false;
double requiredStorageGB = Calamares::JobQueue::instance() double requiredStorageGB = Calamares::JobQueue::instance()
->globalStorage() ->globalStorage()
->value( "requiredStorageGB" ) ->value( "requiredStorageGiB" )
.toDouble( &ok ); .toDouble( &ok );
// We require a little more for partitioning overhead and swap file // We require a little more for partitioning overhead and swap file
double advisedStorageGB = requiredStorageGB + 0.5 + 2.0; double advisedStorageGB = requiredStorageGB + 0.5 + 2.0;

View File

@ -462,7 +462,7 @@ ChoicePage::applyActionChoice( ChoicePage::InstallChoice choice )
gs->value( "defaultFileSystemType" ).toString(), gs->value( "defaultFileSystemType" ).toString(),
m_encryptWidget->passphrase(), m_encryptWidget->passphrase(),
gs->value( "efiSystemPartition" ).toString(), gs->value( "efiSystemPartition" ).toString(),
CalamaresUtils::GiBtoBytes( gs->value( "requiredStorageGB" ).toDouble() ), CalamaresUtils::GiBtoBytes( gs->value( "requiredStorageGiB" ).toDouble() ),
m_eraseSwapChoice m_eraseSwapChoice
}; };
@ -560,7 +560,7 @@ ChoicePage::doAlongsideSetupSplitter( const QModelIndex& current,
double requiredStorageGB = Calamares::JobQueue::instance() double requiredStorageGB = Calamares::JobQueue::instance()
->globalStorage() ->globalStorage()
->value( "requiredStorageGB" ) ->value( "requiredStorageGiB" )
.toDouble(); .toDouble();
// TODO: make this consistent // TODO: make this consistent

View File

@ -143,7 +143,7 @@ ReplaceWidget::onPartitionSelected()
bool ok = false; bool ok = false;
double requiredSpaceB = Calamares::JobQueue::instance() double requiredSpaceB = Calamares::JobQueue::instance()
->globalStorage() ->globalStorage()
->value( "requiredStorageGB" ) ->value( "requiredStorageGiB" )
.toDouble( &ok ) * 1024 * 1024 * 1024; .toDouble( &ok ) * 1024 * 1024 * 1024;
PartitionModel* model = qobject_cast< PartitionModel* >( m_ui->partitionTreeView->model() ); PartitionModel* model = qobject_cast< PartitionModel* >( m_ui->partitionTreeView->model() );

View File

@ -216,7 +216,7 @@ GeneralRequirements::setConfigurationMap( const QVariantMap& configurationMap )
m_requiredStorageGiB = 3.; m_requiredStorageGiB = 3.;
} }
Calamares::JobQueue::instance()->globalStorage()->insert( "requiredStorageGB", m_requiredStorageGiB ); Calamares::JobQueue::instance()->globalStorage()->insert( "requiredStorageGiB", m_requiredStorageGiB );
} }
else else
{ {