1 #ifndef EMPTYPARENTCOMMAND_H 2 #define EMPTYPARENTCOMMAND_H 4 #include <QUndoCommand> 30 bool checkIfChildrenObsolete()
const;
35 #endif // EMPTYPARENTCOMMAND_H static EmptyParentCommand * make(const QString &text, QUndoCommand *parent=nullptr)
make Makes an empty parent command with the given text.
Definition: emptyparentcommand.cpp:3
The EmptyParentCommand class works almost exactly like the default QUndoCommand implementation, except that it sets itself obsolete if all of its children are obsolete. This way, command macros that do nothing will get removed.
Definition: emptyparentcommand.h:12
void redo() override
Definition: emptyparentcommand.cpp:9
void undo() override
Definition: emptyparentcommand.cpp:18