mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
626a149b7c
commit
160d2ab071
3 changed files with 19 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue