summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-10-09 09:32:55 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-11-06 10:00:07 +0000
commitbe8c12a814cbed3f1fcb7097f6980fae6112cbc3 (patch)
treeaf713aee9739d9f994e5a9404d7995f7f2d1011b /src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
parentfce0c120e4e67496e4a8d76398a8c105a76c42c4 (diff)
Print JS console messages by default
Change the behavior of QWebEnginePage/WebEngineView to print JavaScript console.warn and console.error messages by default in a 'js' logging category. This matches also the behavior for QtQml, where console messages end up in a 'qml' logging category by default. So far access to the JavaScript console required either use of the remote debugging functionality, subclassing of QWebEnginePage, or implementing a custom handler. Anyhow, even then writing a seamless forwarding of the data and metadata to the Qt message handler is difficult. This patches implements this forwarding by default. The behavior can be changed by either setting up rules for the 'js' category, e.g. setFilterRules("js.*=false"); or by implementing onJavaScriptConsoleMessage(), or overriding QWebEnginePage::javaScriptConsoleMessage. [ChangeLog] Unhandled JS console messages are now forwarded to to the Qt message handler inside a 'js' category. Change-Id: I5480383a80dcf7a122496f9b7915264ef9036db3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc')
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index b7b3bf022..9c07ce543 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -262,7 +262,8 @@
\a level indicates the severity of the event that triggered the message. That is, whether it
was triggered by an error or a less severe event.
- The default implementation prints nothing.
+ Since Qt 5.6, the default implementation logs the messages in a \c js
+ \l{QLoggingCategory}{logging category}.
*/
/*!