summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-05 08:57:02 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-10 09:25:57 -0700
commit160d2ab07155d895991a5198c574fcf26c2e908f (patch)
tree26dedcc04b7cfe5f6a557d5a7b2113dd7d697be2 /commands
parent626a149b7c6793dea6db1af23068b90205b65e2a (diff)
downloadsubsurface-160d2ab07155d895991a5198c574fcf26c2e908f.tar.gz
core: make command texts available for C code
Create a C string (which the caller needs to free) with the executed commands in this session. The detour via the callback allows us to not make the corelib depend on the commands, which is nice for tests, export-html, and smtk2ssrf. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'commands')
-rw-r--r--commands/command_base.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/command_base.cpp b/commands/command_base.cpp
index 1f924378b..d13daf269 100644
--- a/commands/command_base.cpp
+++ b/commands/command_base.cpp
@@ -8,10 +8,14 @@ namespace Command {
static QUndoStack undoStack;
+// forward declaration
+QString changesMade();
+
// General commands
void init()
{
QObject::connect(&undoStack, &QUndoStack::cleanChanged, &updateWindowTitle);
+ changesCallback = &changesMade;
}
void clear()