[libcalamares] Document Job::prettyDescription

The TODO said it was unused: it **is** used, but only in
a very limited scope. Drop it from jobs where it wasn't
useful (e.g. those that just return prettyName(), outside
of the partition module).
This commit is contained in:
Adriaan de Groot 2020-08-04 11:19:17 +02:00
parent 88e5e98d29
commit 320779ccbe
5 changed files with 11 additions and 33 deletions

View File

@ -1,6 +1,8 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
*
* SPDX-FileCopyrightText: 2014-2015 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -15,9 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
* License-Filename: LICENSE
*
*/
#ifndef CALAMARES_JOB_H
#define CALAMARES_JOB_H
@ -114,7 +113,14 @@ public:
* For status and state information, see prettyStatusMessage().
*/
virtual QString prettyName() const = 0;
// TODO: Unused
/** @brief a longer human-readable description of what the job will do
*
* This **may** be used by view steps to fill in the summary
* messages for the summary page; at present, only the *partition*
* module does so.
*
* The default implementation returns an empty string.
*/
virtual QString prettyDescription() const;
/** @brief A human-readable status for progress reporting
*

View File

@ -41,12 +41,6 @@ PlasmaLnfJob::prettyName() const
return tr( "Plasma Look-and-Feel Job" );
}
QString
PlasmaLnfJob::prettyDescription() const
{
return prettyName();
}
QString PlasmaLnfJob::prettyStatusMessage() const
{
return prettyName();

View File

@ -33,7 +33,6 @@ public:
virtual ~PlasmaLnfJob() override;
QString prettyName() const override;
QString prettyDescription() const override;
QString prettyStatusMessage() const override;
Calamares::JobResult exec() override;

View File

@ -46,12 +46,6 @@ TrackingInstallJob::prettyName() const
return tr( "Installation feedback" );
}
QString
TrackingInstallJob::prettyDescription() const
{
return prettyName();
}
QString
TrackingInstallJob::prettyStatusMessage() const
{
@ -86,12 +80,6 @@ TrackingMachineUpdateManagerJob::prettyName() const
return tr( "Machine feedback" );
}
QString
TrackingMachineUpdateManagerJob::prettyDescription() const
{
return prettyName();
}
QString
TrackingMachineUpdateManagerJob::prettyStatusMessage() const
{
@ -143,12 +131,6 @@ TrackingKUserFeedbackJob::prettyName() const
return tr( "KDE user feedback" );
}
QString
TrackingKUserFeedbackJob::prettyDescription() const
{
return prettyName();
}
QString
TrackingKUserFeedbackJob::prettyStatusMessage() const
{

View File

@ -54,7 +54,6 @@ public:
~TrackingInstallJob() override;
QString prettyName() const override;
QString prettyDescription() const override;
QString prettyStatusMessage() const override;
Calamares::JobResult exec() override;
@ -75,7 +74,6 @@ public:
~TrackingMachineUpdateManagerJob() override;
QString prettyName() const override;
QString prettyDescription() const override;
QString prettyStatusMessage() const override;
Calamares::JobResult exec() override;
};
@ -93,7 +91,6 @@ public:
~TrackingKUserFeedbackJob() override;
QString prettyName() const override;
QString prettyDescription() const override;
QString prettyStatusMessage() const override;
Calamares::JobResult exec() override;