aboutsummaryrefslogtreecommitdiffstats
path: root/commands/command_base.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-05 09:00:00 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-10 09:25:57 -0700
commit0212b1b9f7734c2ee4edaf7e27a2c25601b5c4bc (patch)
tree6c3120611aa8b41948b6a96cc0f67d7cfd07b23d /commands/command_base.h
parent8ce4e10ccb98558886ef4ead4554f44345acd603 (diff)
downloadsubsurface-0212b1b9f7734c2ee4edaf7e27a2c25601b5c4bc.tar.gz
undo infrastructure: improve undo command texts
For many of the commands it is fairly easy to add information that makes it easier to figure out what actually happened. That's especially true for commands operating on dives. Trip and dive site edits haven't been given these more elaborate undo texts (yet). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'commands/command_base.h')
-rw-r--r--commands/command_base.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/command_base.h b/commands/command_base.h
index 59c3cd412..ffc6c4e91 100644
--- a/commands/command_base.h
+++ b/commands/command_base.h
@@ -172,7 +172,12 @@ public:
// If nothing is to be done, the command will be deleted and false is returned.
bool execute(Base *cmd);
+// helper function to create more meaningful undo/redo texts (and get the list
+// of those texts for the git storage commit message)
QUndoStack *getUndoStack();
+QString diveNumberOrDate(struct dive *d);
+QString getListOfDives(const std::vector<dive *> &dives);
+QString getListOfDives(QVector<struct dive *> dives);
} // namespace Command