mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-22 23:18:22 -04:00
[partition] Reduce warnings about shadowed variables
This commit is contained in:
parent
d89553a777
commit
149f3ff3fe
1 changed files with 13 additions and 13 deletions
|
@ -60,10 +60,11 @@ createZfs( Partition* partition, Device* device )
|
||||||
// Now we need to do some things that would normally be done by kpmcore
|
// Now we need to do some things that would normally be done by kpmcore
|
||||||
|
|
||||||
// First we get the device node from the output and set it as the partition path
|
// First we get the device node from the output and set it as the partition path
|
||||||
|
QString deviceNode;
|
||||||
|
{
|
||||||
QRegularExpression re( QStringLiteral( "Created a new partition (\\d+)" ) );
|
QRegularExpression re( QStringLiteral( "Created a new partition (\\d+)" ) );
|
||||||
QRegularExpressionMatch rem = re.match( r.getOutput() );
|
QRegularExpressionMatch rem = re.match( r.getOutput() );
|
||||||
|
|
||||||
QString deviceNode;
|
|
||||||
if ( rem.hasMatch() )
|
if ( rem.hasMatch() )
|
||||||
{
|
{
|
||||||
if ( partition->devicePath().back().isDigit() )
|
if ( partition->devicePath().back().isDigit() )
|
||||||
|
@ -75,9 +76,8 @@ createZfs( Partition* partition, Device* device )
|
||||||
deviceNode = partition->devicePath() + rem.captured( 1 );
|
deviceNode = partition->devicePath() + rem.captured( 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
partition->setPartitionPath( deviceNode );
|
partition->setPartitionPath( deviceNode );
|
||||||
|
}
|
||||||
// If it is a gpt device, set the partition UUID
|
// If it is a gpt device, set the partition UUID
|
||||||
if ( device->partitionTable()->type() == PartitionTable::gpt && partition->uuid().isEmpty() )
|
if ( device->partitionTable()->type() == PartitionTable::gpt && partition->uuid().isEmpty() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue