summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextdocumentfragment.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-04-07 10:49:17 +0200
committerLars Knoll <lars.knoll@qt.io>2020-04-21 15:46:36 +0200
commit50916edd9d1707774c597abe1b7237e1a798fc53 (patch)
treeba761a0d1f017836fb1957212a63ff9854bce76c /src/gui/text/qtextdocumentfragment.h
parenta23cb5cd06bcc3268387cb1abaa0dc2c2d3b13f4 (diff)
Always encode HTML as utf-8
When converting a text document to HTML, always convert it to utf-8, as required by the HTML standard. This also means that we remove the optional encoding parameter. Change-Id: I0bd2fc9df2d06734e1c5b8053b964fbfbb6881e1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/gui/text/qtextdocumentfragment.h')
-rw-r--r--src/gui/text/qtextdocumentfragment.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/text/qtextdocumentfragment.h b/src/gui/text/qtextdocumentfragment.h
index a56f6d06d6..2283b06c6c 100644
--- a/src/gui/text/qtextdocumentfragment.h
+++ b/src/gui/text/qtextdocumentfragment.h
@@ -65,13 +65,12 @@ public:
QString toPlainText() const;
#ifndef QT_NO_TEXTHTMLPARSER
- QString toHtml(const QByteArray &encoding = QByteArray()) const;
+ QString toHtml() const;
#endif // QT_NO_TEXTHTMLPARSER
static QTextDocumentFragment fromPlainText(const QString &plainText);
#ifndef QT_NO_TEXTHTMLPARSER
- static QTextDocumentFragment fromHtml(const QString &html);
- static QTextDocumentFragment fromHtml(const QString &html, const QTextDocument *resourceProvider);
+ static QTextDocumentFragment fromHtml(const QString &html, const QTextDocument *resourceProvider = nullptr);
#endif // QT_NO_TEXTHTMLPARSER
private: