--- a/src/gui/text/qtextdocument_p.h Tue Jan 26 12:42:25 2010 +0200
+++ b/src/gui/text/qtextdocument_p.h Tue Feb 02 00:43:10 2010 +0200
@@ -212,6 +212,9 @@
inline bool isUndoAvailable() const { return undoEnabled && undoState > 0; }
inline bool isRedoAvailable() const { return undoEnabled && undoState < undoStack.size(); }
+ inline int availableUndoSteps() const { return undoEnabled ? undoState : 0; }
+ inline int availableRedoSteps() const { return undoEnabled ? qMax(undoStack.size() - undoState - 1, 0) : 0; }
+
inline QString buffer() const { return text; }
QString plainText() const;
inline int length() const { return fragments.length(); }