From b9a12f07441d345797787f7142a240a386e513b2 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 4 Dec 2017 11:27:03 +0100 Subject: Hardcode default argument for mimetype in ::setContent The docs were wrong in that the default is actually text/plain with US-ASCII encoding (see e.g. data_url_unittest.cc). Anyhow, saying it might change in the future does not help anyone, and is actually a potential security risk - see e.g. the discussion about 'magic' in QTextEdit::setText(). Because of this, it's unlikely that Chromium ever changes the default. Anyhow, we can as well hardcode the default, and document it then. Change-Id: I949111598a30fa69d152d3e98d76e9d96df92d54 Reviewed-by: Leena Miettinen Reviewed-by: Viktor Engelmann Reviewed-by: Allan Sandfeld Jensen --- src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | 5 ++--- src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/webenginewidgets/doc') diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc index 715fce6d0..b7c876ddd 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -638,9 +638,8 @@ /*! \fn void QWebEnginePage::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl) - Sets the content of this page to \a data. If the \a mimeType argument - is empty, it is currently assumed that the content is HTML but in future versions we may introduce - auto-detection. + Sets the content of the web page to \a data. If the \a mimeType argument + is empty, it is assumed that the content is \c{text/plain,charset=US-ASCII}. External objects referenced in the content are located relative to \a baseUrl. diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc index e54c5d507..9de0609b7 100644 --- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc @@ -152,9 +152,8 @@ /*! \fn void QWebEngineView::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl) - Sets the content of the web view to the specified content \a data. If the \a mimeType argument - is empty, it is currently assumed that the content is HTML but in future versions we may - introduce auto-detection. + Sets the content of the web view to \a data. If the \a mimeType argument + is empty, it is assumed that the content is \c{text/plain,charset=US-ASCII}. External objects referenced in the content are located relative to \a baseUrl. -- cgit v1.2.3