Improve prettyName of all jobs, log them in execJobList()
This commit is contained in:
parent
e2fe559f9d
commit
d48644a49c
@ -63,7 +63,7 @@ MoveFileSystemJob::MoveFileSystemJob( Device* device, Partition* partition, qint
|
|||||||
QString
|
QString
|
||||||
MoveFileSystemJob::prettyName() const
|
MoveFileSystemJob::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Moving file system of partition %1." ).arg( partition()->partitionPath() );
|
return tr( "Move file system of partition %1." ).arg( partition()->partitionPath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <ResizePartitionJob.h>
|
#include <ResizePartitionJob.h>
|
||||||
|
|
||||||
#include <MoveFileSystemJob.h>
|
#include <MoveFileSystemJob.h>
|
||||||
|
#include <utils/Logger.h>
|
||||||
|
|
||||||
// CalaPM
|
// CalaPM
|
||||||
#include <backend/corebackend.h>
|
#include <backend/corebackend.h>
|
||||||
@ -80,7 +81,8 @@ public:
|
|||||||
|
|
||||||
QString prettyName() const override
|
QString prettyName() const override
|
||||||
{
|
{
|
||||||
return QString();
|
QString path = m_context->job->partition()->partitionPath();
|
||||||
|
return tr( "Resize file system on partition %1." ).arg( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult exec() override
|
Calamares::JobResult exec() override
|
||||||
@ -146,7 +148,8 @@ public:
|
|||||||
|
|
||||||
QString prettyName() const override
|
QString prettyName() const override
|
||||||
{
|
{
|
||||||
return QString();
|
QString path = m_context->job->partition()->partitionPath();
|
||||||
|
return tr( "Update geometry of partition %1." ).arg( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult exec() override
|
Calamares::JobResult exec() override
|
||||||
@ -187,14 +190,9 @@ ResizePartitionJob::ResizePartitionJob( Device* device, Partition* partition, qi
|
|||||||
QString
|
QString
|
||||||
ResizePartitionJob::prettyName() const
|
ResizePartitionJob::prettyName() const
|
||||||
{
|
{
|
||||||
/*
|
// FIXME: Copy PM ResizeOperation code which generates a description of the
|
||||||
return tr( "Format partition %1 (file system: %2, size: %3 MB) on %4." )
|
// operation
|
||||||
.arg( m_partition->partitionPath() )
|
return tr( "Resize partition %1." ).arg( partition()->partitionPath() );
|
||||||
.arg( m_partition->fileSystem().name() )
|
|
||||||
.arg( m_partition->capacity() / 1024 / 1024 )
|
|
||||||
.arg( m_device->name() );
|
|
||||||
*/
|
|
||||||
return QString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
@ -283,6 +281,7 @@ ResizePartitionJob::execJobList( const QList< Calamares::job_ptr >& jobs )
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
for ( Calamares::job_ptr job : jobs )
|
for ( Calamares::job_ptr job : jobs )
|
||||||
{
|
{
|
||||||
|
cLog() << "- " + job->prettyName();
|
||||||
Calamares::JobResult result = job->exec();
|
Calamares::JobResult result = job->exec();
|
||||||
if ( !result )
|
if ( !result )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user