summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument.cpp
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2009-09-24 10:31:51 (GMT)
committermae <qt-info@nokia.com>2009-09-24 10:33:20 (GMT)
commit06aa9b6704637864130e318e8700f1b0b4f8a5e3 (patch)
treef2140e2d31b62570bcd278a088670bbc9cf87234 /src/gui/text/qtextdocument.cpp
parent135e02d11becc8ee434524756d85221244c185ee (diff)
downloadQt-06aa9b6704637864130e318e8700f1b0b4f8a5e3.zip
Qt-06aa9b6704637864130e318e8700f1b0b4f8a5e3.tar.gz
Qt-06aa9b6704637864130e318e8700f1b0b4f8a5e3.tar.bz2
Fix QTextDocument::revision()
The revision was bound to the current depth of the undo stack. This had the negative side effect, that equal revisions could point to different documents, and sometimes changes would not even increase the revision (in the case of undo command merging). Reviewed-by: Roberto Raggi
Diffstat (limited to 'src/gui/text/qtextdocument.cpp')
-rw-r--r--src/gui/text/qtextdocument.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 57d4b7a..5540958 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -985,7 +985,7 @@ bool QTextDocument::isRedoAvailable() const
int QTextDocument::revision() const
{
Q_D(const QTextDocument);
- return d->undoState;
+ return d->revision;
}