diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2010-02-09 13:30:08 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-02-09 13:53:37 (GMT) |
commit | 54290ef776a311f0c303e2a8df4de5e39e9a032a (patch) | |
tree | e7131c2f90e6d9a121a656671e4e6e6a07efb889 /src/gui/text/qtextdocument_p.h | |
parent | 4710521ab62540378816d3888936eace9686ff97 (diff) | |
download | Qt-54290ef776a311f0c303e2a8df4de5e39e9a032a.zip Qt-54290ef776a311f0c303e2a8df4de5e39e9a032a.tar.gz Qt-54290ef776a311f0c303e2a8df4de5e39e9a032a.tar.bz2 |
Added method to clear the undo/redo stacks.
Reviewed-by: mae
Diffstat (limited to 'src/gui/text/qtextdocument_p.h')
-rw-r--r-- | src/gui/text/qtextdocument_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h index 4ecc2fa..ac5ed3c 100644 --- a/src/gui/text/qtextdocument_p.h +++ b/src/gui/text/qtextdocument_p.h @@ -252,10 +252,11 @@ public: inline QFont defaultFont() const { return formats.defaultFont(); } inline void setDefaultFont(const QFont &f) { formats.setDefaultFont(f); } + void clearUndoRedoStacks(QTextDocument::Stacks stacksToClear, bool emitSignals = false); + private: bool split(int pos); bool unite(uint f); - void truncateUndoStack(); void insert_string(int pos, uint strPos, uint length, int format, QTextUndoCommand::Operation op); int insert_block(int pos, uint strPos, int format, int blockformat, QTextUndoCommand::Operation op, int command); |