[partition] Introduce convenience translation for progress.

This commit is contained in:
Adriaan de Groot 2017-12-14 16:09:54 -05:00
parent 5c4286eebf
commit 55ed2ba4c0
4 changed files with 19 additions and 5 deletions

View file

@ -135,10 +135,7 @@ SetPartFlagsJob::exec()
Report report ( nullptr );
SetPartFlagsOperation op( *m_device, *partition(), m_flags );
op.setStatus( Operation::StatusRunning );
connect( &op, &Operation::progress, [&]( int percent )
{
emit progress( percent / 100.0 );
} );
connect( &op, &Operation::progress, this, &SetPartFlagsJob::progress );
QString errorMessage = tr( "The installer failed to set flags on partition %1." )
.arg( m_partition->partitionPath() );