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>
This commit is contained in:
parent
dd4b09ae1a
commit
6246e142a4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user