[partition] C++ style
This commit is contained in:
parent
16fbe4dc8c
commit
ba21a221df
@ -477,33 +477,21 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
if ( configurationMap.contains( "efiSystemPartition" ) &&
|
if ( configurationMap.contains( "efiSystemPartition" ) &&
|
||||||
configurationMap.value( "efiSystemPartition" ).type() == QVariant::String &&
|
configurationMap.value( "efiSystemPartition" ).type() == QVariant::String &&
|
||||||
!configurationMap.value( "efiSystemPartition" ).toString().isEmpty() )
|
!configurationMap.value( "efiSystemPartition" ).toString().isEmpty() )
|
||||||
{
|
|
||||||
gs->insert( "efiSystemPartition", configurationMap.value( "efiSystemPartition" ).toString() );
|
gs->insert( "efiSystemPartition", configurationMap.value( "efiSystemPartition" ).toString() );
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
gs->insert( "efiSystemPartition", QStringLiteral( "/boot/efi" ) );
|
gs->insert( "efiSystemPartition", QStringLiteral( "/boot/efi" ) );
|
||||||
}
|
|
||||||
|
|
||||||
if ( configurationMap.contains( "ensureSuspendToDisk" ) &&
|
if ( configurationMap.contains( "ensureSuspendToDisk" ) &&
|
||||||
configurationMap.value( "ensureSuspendToDisk" ).type() == QVariant::Bool )
|
configurationMap.value( "ensureSuspendToDisk" ).type() == QVariant::Bool )
|
||||||
{
|
|
||||||
gs->insert( "ensureSuspendToDisk", configurationMap.value( "ensureSuspendToDisk" ).toBool() );
|
gs->insert( "ensureSuspendToDisk", configurationMap.value( "ensureSuspendToDisk" ).toBool() );
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
gs->insert( "ensureSuspendToDisk", true );
|
gs->insert( "ensureSuspendToDisk", true );
|
||||||
}
|
|
||||||
|
|
||||||
if ( configurationMap.contains( "neverCreateSwap" ) &&
|
if ( configurationMap.contains( "neverCreateSwap" ) &&
|
||||||
configurationMap.value( "neverCreateSwap" ).type() == QVariant::Bool )
|
configurationMap.value( "neverCreateSwap" ).type() == QVariant::Bool )
|
||||||
{
|
|
||||||
gs->insert( "neverCreateSwap", configurationMap.value( "neverCreateSwap" ).toBool() );
|
gs->insert( "neverCreateSwap", configurationMap.value( "neverCreateSwap" ).toBool() );
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
gs->insert( "neverCreateSwap", false );
|
gs->insert( "neverCreateSwap", false );
|
||||||
}
|
|
||||||
|
|
||||||
if ( configurationMap.contains( "drawNestedPartitions" ) &&
|
if ( configurationMap.contains( "drawNestedPartitions" ) &&
|
||||||
configurationMap.value( "drawNestedPartitions" ).type() == QVariant::Bool )
|
configurationMap.value( "drawNestedPartitions" ).type() == QVariant::Bool )
|
||||||
@ -512,9 +500,7 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
configurationMap.value( "drawNestedPartitions", false ).toBool() );
|
configurationMap.value( "drawNestedPartitions", false ).toBool() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
gs->insert( "drawNestedPartitions", false );
|
gs->insert( "drawNestedPartitions", false );
|
||||||
}
|
|
||||||
|
|
||||||
if ( configurationMap.contains( "alwaysShowPartitionLabels" ) &&
|
if ( configurationMap.contains( "alwaysShowPartitionLabels" ) &&
|
||||||
configurationMap.value( "alwaysShowPartitionLabels" ).type() == QVariant::Bool )
|
configurationMap.value( "alwaysShowPartitionLabels" ).type() == QVariant::Bool )
|
||||||
@ -523,9 +509,7 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
configurationMap.value( "alwaysShowPartitionLabels", true ).toBool() );
|
configurationMap.value( "alwaysShowPartitionLabels", true ).toBool() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
gs->insert( "alwaysShowPartitionLabels", true );
|
gs->insert( "alwaysShowPartitionLabels", true );
|
||||||
}
|
|
||||||
|
|
||||||
if ( configurationMap.contains( "defaultFileSystemType" ) &&
|
if ( configurationMap.contains( "defaultFileSystemType" ) &&
|
||||||
configurationMap.value( "defaultFileSystemType" ).type() == QVariant::String &&
|
configurationMap.value( "defaultFileSystemType" ).type() == QVariant::String &&
|
||||||
@ -540,9 +524,7 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
gs->insert( "defaultFileSystemType", QStringLiteral( "ext4" ) );
|
gs->insert( "defaultFileSystemType", QStringLiteral( "ext4" ) );
|
||||||
}
|
|
||||||
|
|
||||||
if ( configurationMap.contains( "enableLuksAutomatedPartitioning" ) &&
|
if ( configurationMap.contains( "enableLuksAutomatedPartitioning" ) &&
|
||||||
configurationMap.value( "enableLuksAutomatedPartitioning" ).type() == QVariant::Bool )
|
configurationMap.value( "enableLuksAutomatedPartitioning" ).type() == QVariant::Bool )
|
||||||
@ -551,9 +533,7 @@ PartitionViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
|||||||
configurationMap.value( "enableLuksAutomatedPartitioning" ).toBool() );
|
configurationMap.value( "enableLuksAutomatedPartitioning" ).toBool() );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
gs->insert( "enableLuksAutomatedPartitioning", true );
|
gs->insert( "enableLuksAutomatedPartitioning", true );
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Now that we have the config, we load the PartitionCoreModule in the background
|
// Now that we have the config, we load the PartitionCoreModule in the background
|
||||||
|
Loading…
Reference in New Issue
Block a user