[partition] With rvalue, code becomes even more compact
This commit is contained in:
parent
8bb2c5fc6b
commit
1356012fb4
@ -128,7 +128,7 @@ clonePartition( Device* device, Partition* partition )
|
|||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
execute( Operation& operation, const QString& failureMessage )
|
execute( Operation&& operation, const QString& failureMessage )
|
||||||
{
|
{
|
||||||
operation.setStatus( Operation::StatusRunning );
|
operation.setStatus( Operation::StatusRunning );
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ Partition* clonePartition( Device* device, Partition* partition );
|
|||||||
* Otherwise returns an error using @p failureMessage as the primary part
|
* Otherwise returns an error using @p failureMessage as the primary part
|
||||||
* of the error, and details obtained from the operation.
|
* of the error, and details obtained from the operation.
|
||||||
*/
|
*/
|
||||||
Calamares::JobResult execute( Operation& operation, const QString& failureMessage );
|
Calamares::JobResult execute( Operation&& operation, const QString& failureMessage );
|
||||||
|
|
||||||
} // namespace KPMHelpers
|
} // namespace KPMHelpers
|
||||||
|
|
||||||
|
@ -275,9 +275,9 @@ CreatePartitionJob::exec()
|
|||||||
return createZfs( m_partition, m_device );
|
return createZfs( m_partition, m_device );
|
||||||
}
|
}
|
||||||
|
|
||||||
NewOperation op( *m_device, m_partition );
|
|
||||||
return KPMHelpers::execute(
|
return KPMHelpers::execute(
|
||||||
op, tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() ) );
|
NewOperation( *m_device, m_partition ),
|
||||||
|
tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -98,8 +98,7 @@ DeletePartitionJob::exec()
|
|||||||
return removePartition( m_partition );
|
return removePartition( m_partition );
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteOperation op( *m_device, m_partition );
|
return KPMHelpers::execute( DeleteOperation( *m_device, m_partition ),
|
||||||
return KPMHelpers::execute( op,
|
|
||||||
tr( "The installer failed to delete partition %1." ).arg( m_partition->devicePath() ) );
|
tr( "The installer failed to delete partition %1." ).arg( m_partition->devicePath() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user