diff options
author | 2021-08-17 11:14:42 -0700 | |
---|---|---|
committer | 2021-08-18 13:22:02 -0700 | |
commit | e7a5ec46f5577656acd1ce44b34e761193ab015b (patch) | |
tree | 512c0739ba44f41e44ea2c1d6e7ccddd4a33fdc9 /commands/command_device.h | |
parent | fbe17e620e7b92b2af0d65d7b4c8fe688f2b6058 (diff) | |
download | subsurface-e7a5ec46f5577656acd1ce44b34e761193ab015b.tar.gz |
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>
Diffstat (limited to 'commands/command_device.h')
-rw-r--r-- | commands/command_device.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/commands/command_device.h b/commands/command_device.h index c1cf1a240..b948e63e9 100644 --- a/commands/command_device.h +++ b/commands/command_device.h @@ -12,24 +12,9 @@ struct device; // We put everything in a namespace, so that we can shorten names without polluting the global namespace namespace Command { -class RemoveDevice final : public Base { -public: - RemoveDevice(int index); -private: - // for undo - device dev; - - // for redo - int index; - - void undo() override; - void redo() override; - bool workToBeDone() override; -}; - class EditDeviceNickname final : public Base { public: - EditDeviceNickname(int index, const QString &nickname); + EditDeviceNickname(const divecomputer *dc, const QString &nickname); private: // for redo and undo int index; |