|
|
@ -20,6 +20,7 @@
|
|
|
|
#include "jobs/CreatePartitionJob.h"
|
|
|
|
#include "jobs/CreatePartitionJob.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "utils/Logger.h"
|
|
|
|
#include "utils/Logger.h"
|
|
|
|
|
|
|
|
#include "utils/Units.h"
|
|
|
|
|
|
|
|
|
|
|
|
// KPMcore
|
|
|
|
// KPMcore
|
|
|
|
#include <kpmcore/backend/corebackend.h>
|
|
|
|
#include <kpmcore/backend/corebackend.h>
|
|
|
@ -47,7 +48,7 @@ CreatePartitionJob::prettyName() const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return tr( "Create new %2MB partition on %4 (%3) with file system %1." )
|
|
|
|
return tr( "Create new %2MB partition on %4 (%3) with file system %1." )
|
|
|
|
.arg( m_partition->fileSystem().name() )
|
|
|
|
.arg( m_partition->fileSystem().name() )
|
|
|
|
.arg( m_partition->capacity() / 1024 / 1024 )
|
|
|
|
.arg( CalamaresUtils::BytesToMiB( m_partition->capacity() )
|
|
|
|
.arg( m_device->name() )
|
|
|
|
.arg( m_device->name() )
|
|
|
|
.arg( m_device->deviceNode() );
|
|
|
|
.arg( m_device->deviceNode() );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -59,7 +60,7 @@ CreatePartitionJob::prettyDescription() const
|
|
|
|
return tr( "Create new <strong>%2MB</strong> partition on <strong>%4</strong> "
|
|
|
|
return tr( "Create new <strong>%2MB</strong> partition on <strong>%4</strong> "
|
|
|
|
"(%3) with file system <strong>%1</strong>." )
|
|
|
|
"(%3) with file system <strong>%1</strong>." )
|
|
|
|
.arg( m_partition->fileSystem().name() )
|
|
|
|
.arg( m_partition->fileSystem().name() )
|
|
|
|
.arg( m_partition->capacity() / 1024 / 1024 )
|
|
|
|
.arg( CalamaresUtils::BytesToMiB( m_partition->capacity() )
|
|
|
|
.arg( m_device->name() )
|
|
|
|
.arg( m_device->name() )
|
|
|
|
.arg( m_device->deviceNode() );
|
|
|
|
.arg( m_device->deviceNode() );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -79,7 +80,7 @@ CreatePartitionJob::exec()
|
|
|
|
int step = 0;
|
|
|
|
int step = 0;
|
|
|
|
const qreal stepCount = 4;
|
|
|
|
const qreal stepCount = 4;
|
|
|
|
|
|
|
|
|
|
|
|
Report report( 0 );
|
|
|
|
Report report( nullptr );
|
|
|
|
QString message = tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() );
|
|
|
|
QString message = tr( "The installer failed to create partition on disk '%1'." ).arg( m_device->name() );
|
|
|
|
|
|
|
|
|
|
|
|
progress( step++ / stepCount );
|
|
|
|
progress( step++ / stepCount );
|
|
|
|