undo/device: adjust device management infrastructure

We no longer need the remove infrastructure, and the edit nickname function
becomes much more intuitive to use by passing in the dive computer for
which we want to create a nickname instead of the internal index into
the array of devices.

This also removes / simplifies the device list update signals in the
DiveListNotifier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2021-08-17 11:14:42 -07:00
parent fbe17e620e
commit e7a5ec46f5
6 changed files with 15 additions and 72 deletions

View file

@ -381,14 +381,9 @@ void addPictures(const std::vector<PictureListForAddition> &pictures)
execute(new AddPictures(pictures));
}
void removeDevice(int idx)
void editDeviceNickname(struct divecomputer *dc, const QString &nickname)
{
execute(new RemoveDevice(idx));
}
void editDeviceNickname(int idx, const QString &nickname)
{
execute(new EditDeviceNickname(idx, nickname));
execute(new EditDeviceNickname(dc, nickname));
}
void createFilterPreset(const QString &name, const FilterData &data)