From 160d2ab07155d895991a5198c574fcf26c2e908f Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 5 Mar 2020 08:57:02 -0800 Subject: 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 --- commands/command_base.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'commands') 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() -- cgit v1.2.3-70-g09d2