diff options
author | Moss Heim <moss.heim@qt.io> | 2024-01-26 11:51:56 +0100 |
---|---|---|
committer | Moss Heim <moss.heim@qt.io> | 2024-02-05 09:59:01 +0100 |
commit | 2d52d1544e85b8bd15ea23c42872961b9f9249ec (patch) | |
tree | e1620906b5ecba0c01d99be786e81fce0d843737 | |
parent | 674732fd8ac62be3fe04ae5333c809a1ebc74285 (diff) |
Clarify meaning of baseUrl argument in setContent
The previous wording made it sound as if baseUrl must always be
non-empty, however this only affects external content relative URLs.
Fixes: QTBUG-90927
Pick-to: 6.7 6.6
Change-Id: I0dff3368dec60b5734c1b12bbfe3f4aefc240e14
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r-- | src/core/doc/src/qwebenginepage_lgpl.qdoc | 1 | ||||
-rw-r--r-- | src/webenginequick/doc/src/webengineview_lgpl.qdoc | 5 | ||||
-rw-r--r-- | src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc | 7 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/core/doc/src/qwebenginepage_lgpl.qdoc b/src/core/doc/src/qwebenginepage_lgpl.qdoc index b6f855cb3..4cf10a6cb 100644 --- a/src/core/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/core/doc/src/qwebenginepage_lgpl.qdoc @@ -710,6 +710,7 @@ 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. + For external objects with relative URLs to be loaded, \c baseUrl cannot be empty. The \a data is loaded immediately; external objects are loaded asynchronously. diff --git a/src/webenginequick/doc/src/webengineview_lgpl.qdoc b/src/webenginequick/doc/src/webengineview_lgpl.qdoc index e4d394a99..6b731b11b 100644 --- a/src/webenginequick/doc/src/webengineview_lgpl.qdoc +++ b/src/webenginequick/doc/src/webengineview_lgpl.qdoc @@ -356,9 +356,8 @@ This method offers a lower-level alternative to the \c{url} property, which references HTML pages via URL. - External objects, such as stylesheets or images referenced in the HTML - document, should be located relative to \a baseUrl. For external objects to - be loaded, \c baseUrl cannot be empty. For example, if \a html + \a baseUrl is optional and used to resolve relative URLs in the document, + such as referenced images or stylesheets. For example, if \a html is retrieved from \c http://www.example.com/documents/overview.html, which is the base URL, then an image referenced with the relative URL, \c diagram.png, should be at \c{http://www.example.com/documents/diagram.png}. diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc index 03489640a..3153ec952 100644 --- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc @@ -108,9 +108,8 @@ \fn void QWebEngineView::setHtml(const QString &html, const QUrl &baseUrl) Sets the content of the web view to the specified \a html content. - External objects, such as stylesheets or images referenced in the HTML - document, are located relative to \a baseUrl. For external objects to - be loaded, \c baseUrl cannot be empty. For example, if \a html + \a baseUrl is optional and used to resolve relative URLs in the document, + such as referenced images or stylesheets. For example, if \a html is retrieved from \c http://www.example.com/documents/overview.html, which is the base URL, then an image referenced with the relative URL, \c diagram.png, should be at \c{http://www.example.com/documents/diagram.png}. @@ -144,7 +143,7 @@ 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. - For external objects to be loaded, \c baseUrl cannot be empty. + For external objects with relative URLs to be loaded, \c baseUrl cannot be empty. The data is loaded immediately; external objects are loaded asynchronously. |