undo: remove EditNumber command

Number editing works via the RenumberDives command.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-03-09 16:33:25 +01:00 committed by Dirk Hohndel
parent 6e59ee00d8
commit 9722f04e40
4 changed files with 0 additions and 37 deletions

View file

@ -168,11 +168,6 @@ int editMode(int index, int newValue, bool currentDiveOnly)
return execute_edit(new EditMode(index, newValue, currentDiveOnly));
}
int editNumber(int newValue, bool currentDiveOnly)
{
return execute_edit(new EditNumber(newValue, currentDiveOnly));
}
int editSuit(const QString &newValue, bool currentDiveOnly)
{
return execute_edit(new EditSuit(newValue, currentDiveOnly));

View file

@ -66,7 +66,6 @@ void purgeUnusedDiveSites();
int editNotes(const QString &newValue, bool currentDiveOnly);
int editSuit(const QString &newValue, bool currentDiveOnly);
int editMode(int index, int newValue, bool currentDiveOnly);
int editNumber(int newValue, bool currentDiveOnly);
int editRating(int newValue, bool currentDiveOnly);
int editVisibility(int newValue, bool currentDiveOnly);
int editWaveSize(int newValue, bool currentDiveOnly);

View file

@ -574,28 +574,6 @@ DiveField EditMode::fieldId() const
return DiveField::MODE;
}
// ***** Number *****
void EditNumber::set(struct dive *d, int number) const
{
d->number = number;
}
int EditNumber::data(struct dive *d) const
{
return d->number;
}
QString EditNumber::fieldName() const
{
return tr("number");
}
DiveField EditNumber::fieldId() const
{
return DiveField::NR;
}
// ***** Tag based commands *****
EditTagsBase::EditTagsBase(const QStringList &newListIn, bool currentDiveOnly) :
EditDivesBase(currentDiveOnly),

View file

@ -222,15 +222,6 @@ public:
DiveField fieldId() const override;
};
class EditNumber : public EditBase<int> {
public:
using EditBase<int>::EditBase; // Use constructor of base class.
void set(struct dive *d, int number) const override;
int data(struct dive *d) const override;
QString fieldName() const override;
DiveField fieldId() const override;
};
// Fields that work with tag-lists (tags, buddies, divemasters) work differently and therefore
// have their own base class. In this case, it's not a template, as all these lists are base
// on strings.