summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocument_p.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-07-07 00:33:40 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-07-07 00:33:40 (GMT)
commita16388c1f4ff3d6cb9863a9b16914f6ddb305c05 (patch)
treea9b16c88483fe1678da71badbf3f28121f6cad1f /src/gui/text/qtextdocument_p.cpp
parentcc70c67b13063e789e874a54ab24048428e19dac (diff)
downloadQt-a16388c1f4ff3d6cb9863a9b16914f6ddb305c05.zip
Qt-a16388c1f4ff3d6cb9863a9b16914f6ddb305c05.tar.gz
Qt-a16388c1f4ff3d6cb9863a9b16914f6ddb305c05.tar.bz2
Revert "Fix exponential behavior of QTextCursor::removeSelectedText"
This reverts commit 62db6c18c7f1f60819783ed5e1340e9fc09e072e, which introduced a regression in tst_qtextpiecetable::checkDocumentChanged
Diffstat (limited to 'src/gui/text/qtextdocument_p.cpp')
-rw-r--r--src/gui/text/qtextdocument_p.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 9849317..9bcf8b4 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -205,7 +205,6 @@ QTextDocumentPrivate::QTextDocumentPrivate()
undoEnabled = true;
inContentsChange = false;
- inRemove = false;
defaultTextOption.setTabStop(80); // same as in qtextengine.cpp
defaultTextOption.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
@@ -670,10 +669,7 @@ 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)
@@ -1269,9 +1265,6 @@ 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;