summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-05 11:50:13 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-05 11:50:13 (GMT)
commitdcee6994616e8352f590a62509a1b64494452fff (patch)
treecd958eeceddb28635f0f9186f3a473f8224e1dc4 /src/gui
parent4e349cbea021bd504eb8c1575463fd8ee9ba937b (diff)
parent42318a57e95a875b2168ca027679d9258fcc929b (diff)
downloadQt-dcee6994616e8352f590a62509a1b64494452fff.zip
Qt-dcee6994616e8352f590a62509a1b64494452fff.tar.gz
Qt-dcee6994616e8352f590a62509a1b64494452fff.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: Make declarative pixmap cache easier to use Prepare for QTest persistent store for visual tests. Loosen font-sensitive test. Set correct license header. Work around QTBUG-11929 <br/> shouldn't trigger a new format range in QDeclarativeStyledText. Add styled text layout benchmark. Optimize QDeclarativeStyledText. 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.cpp7
-rw-r--r--src/gui/text/qtextdocument_p.h1
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;