From ae6681673eb5c7768070cad61f483d2a5405dc9e Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 14 Oct 2016 15:54:13 +0200 Subject: Add QTextDocument::toRawText() function The QTextDocument::toPlainText() converts some characters in the text to ASCII, which can be problematic for use cases where you want to save the precise contents of the document, e.g. in Qt Creator. Since we don't want to change the behavior of toPlainText(), we introduce a new function which returns the raw text contents of the document instead, with no modifications. [ChangeLog][QtGui][Text] Added QTextDocument::toRawText() function. Task-number: QTBUG-56538 Change-Id: Ib6c48a16551c4c71c4c431760f993793d1af6806 Reviewed-by: Lars Knoll --- src/gui/text/qtextdocument.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/text/qtextdocument.h') diff --git a/src/gui/text/qtextdocument.h b/src/gui/text/qtextdocument.h index 1888088f0d..c2761a39b9 100644 --- a/src/gui/text/qtextdocument.h +++ b/src/gui/text/qtextdocument.h @@ -151,6 +151,7 @@ public: void setHtml(const QString &html); #endif + QString toRawText() const; QString toPlainText() const; void setPlainText(const QString &text); -- cgit v1.2.3