core/undo: provide access to the QUndoStack

This is used by the mobile UI to get notifications when the undo
text changes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-01-11 15:22:50 -08:00
parent 2936d203e2
commit 41072cf48f
2 changed files with 8 additions and 0 deletions

View file

@ -29,6 +29,12 @@ bool isClean()
return undoStack.isClean();
}
// this can be used to get access to the signals emitted by the QUndoStack
QUndoStack *getUndoStack()
{
return &undoStack;
}
QAction *undoAction(QObject *parent)
{
return undoStack.createUndoAction(parent, QCoreApplication::translate("Command", "&Undo"));