From 3855998fe52097cf749a10af476ec1965b41bada Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Sat, 13 Jun 2015 02:24:58 +0200 Subject: [PATCH] Add prettyStatusMessage to Clear* and Check* partitioning jobs. --- src/modules/partition/jobs/CheckFileSystemJob.cpp | 8 ++++++++ src/modules/partition/jobs/CheckFileSystemJob.h | 1 + src/modules/partition/jobs/ClearMountsJob.cpp | 8 ++++++++ src/modules/partition/jobs/ClearMountsJob.h | 3 ++- src/modules/partition/jobs/ClearTempMountsJob.cpp | 7 +++++++ src/modules/partition/jobs/ClearTempMountsJob.h | 1 + 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/jobs/CheckFileSystemJob.cpp b/src/modules/partition/jobs/CheckFileSystemJob.cpp index 151490e7f..736c0057c 100644 --- a/src/modules/partition/jobs/CheckFileSystemJob.cpp +++ b/src/modules/partition/jobs/CheckFileSystemJob.cpp @@ -34,6 +34,14 @@ CheckFileSystemJob::prettyName() const return tr( "Checking file system on partition %1." ).arg( path ); } + +QString +CheckFileSystemJob::prettyStatusMessage() const +{ + return prettyName(); +} + + Calamares::JobResult CheckFileSystemJob::exec() { diff --git a/src/modules/partition/jobs/CheckFileSystemJob.h b/src/modules/partition/jobs/CheckFileSystemJob.h index 3a165da2b..7dba8f493 100644 --- a/src/modules/partition/jobs/CheckFileSystemJob.h +++ b/src/modules/partition/jobs/CheckFileSystemJob.h @@ -31,6 +31,7 @@ public: CheckFileSystemJob( Partition* partition ); QString prettyName() const override; + QString prettyStatusMessage() const override; Calamares::JobResult exec() override; }; diff --git a/src/modules/partition/jobs/ClearMountsJob.cpp b/src/modules/partition/jobs/ClearMountsJob.cpp index ab563a056..b5ae36a4a 100644 --- a/src/modules/partition/jobs/ClearMountsJob.cpp +++ b/src/modules/partition/jobs/ClearMountsJob.cpp @@ -44,6 +44,14 @@ ClearMountsJob::prettyName() const } +QString +ClearMountsJob::prettyStatusMessage() const +{ + return tr( "Clearing mounts for partitioning operations on %1." ) + .arg( m_device->deviceNode() ); +} + + Calamares::JobResult ClearMountsJob::exec() { diff --git a/src/modules/partition/jobs/ClearMountsJob.h b/src/modules/partition/jobs/ClearMountsJob.h index e77da3762..8503d8d97 100644 --- a/src/modules/partition/jobs/ClearMountsJob.h +++ b/src/modules/partition/jobs/ClearMountsJob.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ class ClearMountsJob : public Calamares::Job public: explicit ClearMountsJob( Device* device ); QString prettyName() const override; + QString prettyStatusMessage() const override; Calamares::JobResult exec() override; private: QString tryUmount( const QString& partPath ); diff --git a/src/modules/partition/jobs/ClearTempMountsJob.cpp b/src/modules/partition/jobs/ClearTempMountsJob.cpp index 043dddb84..e222b3f8a 100644 --- a/src/modules/partition/jobs/ClearTempMountsJob.cpp +++ b/src/modules/partition/jobs/ClearTempMountsJob.cpp @@ -39,6 +39,13 @@ ClearTempMountsJob::prettyName() const } +QString +ClearTempMountsJob::prettyStatusMessage() const +{ + return tr( "Clearing all temporary mounts." ); +} + + Calamares::JobResult ClearTempMountsJob::exec() { diff --git a/src/modules/partition/jobs/ClearTempMountsJob.h b/src/modules/partition/jobs/ClearTempMountsJob.h index f83145c43..1ce15a111 100644 --- a/src/modules/partition/jobs/ClearTempMountsJob.h +++ b/src/modules/partition/jobs/ClearTempMountsJob.h @@ -33,6 +33,7 @@ class ClearTempMountsJob : public Calamares::Job public: explicit ClearTempMountsJob(); QString prettyName() const override; + QString prettyStatusMessage() const override; Calamares::JobResult exec() override; };