diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-03 00:31:19 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-03 00:31:19 (GMT) |
commit | 80de59a2f0289d3f7bbef405ed2175a64faabc96 (patch) | |
tree | 0b47e64e30a277ffe40698405776e591280e9087 /src/gui | |
parent | 8c01157a9056f91d40d3579bfc0eb9b81a5f99d8 (diff) | |
parent | ac52dee57e4417ebd6f6049cfb7998fe9d62e8db (diff) | |
download | Qt-80de59a2f0289d3f7bbef405ed2175a64faabc96.zip Qt-80de59a2f0289d3f7bbef405ed2175a64faabc96.tar.gz Qt-80de59a2f0289d3f7bbef405ed2175a64faabc96.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Don't write to the logger widget while the application is closing down.
Fix exponential behavior of QTextCursor::removeSelectedText
Fix test for N900 (ARM-specific SVG results).
docs - fix doc links, minor improvements
Fix TextEdit bitmap tests testing the wrong element
Make autotests work with qreal == float (in addition to double).
Fix TextInput text getting improperly clipped
fix doc links
Fix docs to link to the new QML Viewer page instead of the Runtime page
qmlviewer: Update the proxy factory when the user changes the proxy.
Don't accept *files* that exist when *directory* is required.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qtextdocument_p.cpp | 7 | ||||
-rw-r--r-- | src/gui/text/qtextdocument_p.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index f3cd481..a55e5f3 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -205,6 +205,7 @@ QTextDocumentPrivate::QTextDocumentPrivate() undoEnabled = true; inContentsChange = false; + inRemove = false; defaultTextOption.setTabStop(80); // same as in qtextengine.cpp defaultTextOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere); @@ -669,7 +670,10 @@ void QTextDocumentPrivate::remove(int pos, int length, QTextUndoCommand::Operati { if (length == 0) return; + inRemove = true; move(pos, -1, length, op); + inRemove = false; + adjustDocumentChangesAndCursors(pos, -length, op); } void QTextDocumentPrivate::setCharFormat(int pos, int length, const QTextCharFormat &newFormat, FormatChangeMode mode) @@ -1263,6 +1267,9 @@ void QTextDocumentPrivate::documentChange(int from, int length) */ void QTextDocumentPrivate::adjustDocumentChangesAndCursors(int from, int addedOrRemoved, QTextUndoCommand::Operation op) { + if (inRemove) // postpone, will be called again from QTextDocumentPrivate::remove() + return; + if (!editBlock) ++revision; diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h index d1bd698..06e0753 100644 --- a/src/gui/text/qtextdocument_p.h +++ b/src/gui/text/qtextdocument_p.h @@ -346,6 +346,7 @@ public: int maximumBlockCount; uint needsEnsureMaximumBlockCount : 1; uint inContentsChange : 1; + uint inRemove : 1; QSizeF pageSize; QString title; QString url; |