diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-21 10:58:50 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-27 09:18:03 +0000 |
commit | a3c7fab7e2a10f529600e1fdbeacc4b8275ffe85 (patch) | |
tree | e3254fb21294a0b362a02ca7d8487d06227b062b | |
parent | e7d460a9a1893c38937d159662b5935bb45d6708 (diff) |
Document world ID limit
The max was bumbed from 11 to 256, now document it.
Task-number: QTBUG-69904
Change-Id: I6cbf64afe3409c4722d7a903d833124880b32bc0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
-rw-r--r-- | src/webengine/api/qquickwebenginescript.cpp | 3 | ||||
-rw-r--r-- | src/webengine/doc/src/webengineview_lgpl.qdoc | 2 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginescript.cpp | 2 | ||||
-rw-r--r-- | src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | 6 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/webengine/api/qquickwebenginescript.cpp b/src/webengine/api/qquickwebenginescript.cpp index acc5cedb7..ab7aee4cb 100644 --- a/src/webengine/api/qquickwebenginescript.cpp +++ b/src/webengine/api/qquickwebenginescript.cpp @@ -86,7 +86,8 @@ QT_BEGIN_NAMESPACE /*! \enum QQuickWebEngineScript::ScriptWorldId - The world ID defining which isolated world the script is executed in. + The world ID defining which isolated world the script is executed in. Besides these predefined + IDs custom IDs can be used, but must be integers between \c 0 and \c 256. \value MainWorld The world used by the page's web contents. It can be useful in order to expose custom diff --git a/src/webengine/doc/src/webengineview_lgpl.qdoc b/src/webengine/doc/src/webengineview_lgpl.qdoc index a6a7c088b..c089538b1 100644 --- a/src/webengine/doc/src/webengineview_lgpl.qdoc +++ b/src/webengine/doc/src/webengineview_lgpl.qdoc @@ -365,7 +365,7 @@ \since QtWebEngine 1.3 JavaScript world that the web channel instance used by this view is - installed in. + installed in. The world must be a number between \c 0 and \c 256. */ /*! diff --git a/src/webenginewidgets/api/qwebenginescript.cpp b/src/webenginewidgets/api/qwebenginescript.cpp index d5247cde1..d1e996b3a 100644 --- a/src/webenginewidgets/api/qwebenginescript.cpp +++ b/src/webenginewidgets/api/qwebenginescript.cpp @@ -224,6 +224,8 @@ quint32 QWebEngineScript::worldId() const /*! Sets the world ID of the isolated world to \a id when running this script. + + Must be between \c 0 and \c 256. */ void QWebEngineScript::setWorldId(quint32 id) { diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc index 3013903c8..f91b71ea1 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -718,9 +718,9 @@ \since 5.7 Runs the JavaScript code contained in \a scriptSource in the world specified by \a worldId. - The world ID values are the same as provided by QWebEngineScript::ScriptWorldId. Using the - \e runJavaScript() versions without the world ID is the same as running the script in the - \c MainWorld. + The world ID values are the same as provided by QWebEngineScript::ScriptWorldId, and between \c 0 + and \c 256. Using the \e runJavaScript() versions without the world ID is the same as running the + script in the \c MainWorld. When the script has been executed, \a resultCallback is called with the result of the last executed statement. \c resultCallback can be any of a function pointer, a functor or a lambda, |