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.cpp | |
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.cpp')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index b8c9b94..80931c9 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -436,6 +436,23 @@ void QTextDocument::redo(QTextCursor *cursor) } /*! + \since 4.7 + Clears the specified stacks. + + This method clears any commands on the undo stack, the redo stack, or both (the + default). If any commands got cleared, the appropriate signals + (\a QTextDocument::undoAvailable or \a QTextDocument::redoAvailable) get + emitted. + + \sa QTextDocument::undoAvailable QTextDocument::redoAvailable +*/ +void QTextDocument::clearUndoRedoStacks(Stacks stacksToClear) +{ + Q_D(QTextDocument); + d->clearUndoRedoStacks(stacksToClear, true); +} + +/*! \overload */ |