diff options
author | Samuel Gaist <samuel.gaist@edeltech.ch> | 2015-01-25 23:36:08 +0100 |
---|---|---|
committer | Samuel Gaist <samuel.gaist@edeltech.ch> | 2015-02-05 23:56:30 +0000 |
commit | 6246e142a48dd66a8cba4ac2846276db5da952ed (patch) | |
tree | 1932b00fb49854de1ba9cd7d657fc4d5687e2d97 | |
parent | dd4b09ae1aed3dd20c46ec240a43d70dc13f1ee4 (diff) |
Improve QTextDocument::setPlainText/Html doc related to undo stack
This patch aims to improve the documentation of setPlainText/setHtml to
let the user know that the undo stack is cleared when both these
function are called.
Change-Id: I079f9f1dd407387941777ebbc7b5a7bc6dc005ec
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index ea2b794feb..77e0fec80d 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -1171,7 +1171,7 @@ QString QTextDocument::toPlainText() const /*! Replaces the entire contents of the document with the given plain - \a text. + \a text. The undo/redo history is reset when this function is called. \sa setHtml() */ @@ -1189,7 +1189,8 @@ void QTextDocument::setPlainText(const QString &text) /*! Replaces the entire contents of the document with the given - HTML-formatted text in the \a html string. + HTML-formatted text in the \a html string. The undo/redo history + is reset when this function is called. The HTML formatting is respected as much as possible; for example, "<b>bold</b> text" will produce text where the first word has a font |