summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@nokia.com>2009-09-24 13:21:03 (GMT)
committerAndy Shaw <andy.shaw@nokia.com>2009-09-24 13:21:03 (GMT)
commit27accea024b8e5929c696ce30b0d45157e1f706f (patch)
tree403b7f88d4d54a27e4e753c9b39333d095991693 /src
parentd01891cb30b12a9531caad6b82964bbd4cc330e2 (diff)
parent930ba91ec1e63067c2ad79eb8d18ff56b78aa500 (diff)
downloadQt-27accea024b8e5929c696ce30b0d45157e1f706f.zip
Qt-27accea024b8e5929c696ce30b0d45157e1f706f.tar.gz
Qt-27accea024b8e5929c696ce30b0d45157e1f706f.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
-rw-r--r--src/gui/text/qtextdocument.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index 5540958..a8956b8 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -1096,8 +1096,10 @@ void QTextDocument::setPlainText(const QString &text)
Q_D(QTextDocument);
bool previousState = d->isUndoRedoEnabled();
d->enableUndoRedo(false);
+ d->beginEditBlock();
d->clear();
QTextCursor(this).insertText(text);
+ d->endEditBlock();
d->enableUndoRedo(previousState);
}
@@ -1123,8 +1125,10 @@ void QTextDocument::setHtml(const QString &html)
Q_D(QTextDocument);
bool previousState = d->isUndoRedoEnabled();
d->enableUndoRedo(false);
+ d->beginEditBlock();
d->clear();
QTextHtmlImporter(this, html, QTextHtmlImporter::ImportToDocument).import();
+ d->endEditBlock();
d->enableUndoRedo(previousState);
}