diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-10-09 10:29:02 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-11-06 10:00:10 +0000 |
commit | d6878aa0c67f4559881e74d3dbe8172006f3732c (patch) | |
tree | 26662ed7aa985126eec452559e62d93c1f3753b3 | |
parent | be8c12a814cbed3f1fcb7097f6980fae6112cbc3 (diff) |
Add documentation about console logging
Change-Id: I50ae0beb54f70c232eed0d9bd47b0dc01dadc130
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
-rw-r--r-- | src/webengine/doc/src/external-resources.qdoc | 5 | ||||
-rw-r--r-- | src/webengine/doc/src/qtwebengine-debugging.qdoc (renamed from src/webengine/doc/src/qtwebengine-devtools.qdoc) | 20 | ||||
-rw-r--r-- | src/webengine/doc/src/qtwebengine-index.qdoc | 2 | ||||
-rw-r--r-- | src/webengine/doc/src/webengineview.qdoc | 2 | ||||
-rw-r--r-- | src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | 2 |
5 files changed, 28 insertions, 3 deletions
diff --git a/src/webengine/doc/src/external-resources.qdoc b/src/webengine/doc/src/external-resources.qdoc index 34a66291e..2987f1fca 100644 --- a/src/webengine/doc/src/external-resources.qdoc +++ b/src/webengine/doc/src/external-resources.qdoc @@ -35,6 +35,11 @@ \title Chrome DevTools */ +/*! + \externalpage https://developers.google.com/web/tools/javascript/console/console-write + \title Chrome console API +*/ + /* This prevents autolinking of each occurrence of 'WebEngine' To link to the WebEngine QML type, use explicit linking: diff --git a/src/webengine/doc/src/qtwebengine-devtools.qdoc b/src/webengine/doc/src/qtwebengine-debugging.qdoc index ee87214e1..bffcd1669 100644 --- a/src/webengine/doc/src/qtwebengine-devtools.qdoc +++ b/src/webengine/doc/src/qtwebengine-debugging.qdoc @@ -26,8 +26,24 @@ ****************************************************************************/ /*! - \page qtwebengine-devtools.html - \title Qt WebEngine Web Developer Tools + \page qtwebengine-debugging.html + \title Qt WebEngine Debugging and Profiling + + \section1 Console Logging + + JavaScript executed inside Qt WebEngine can use the + \l{Chrome console API} to log information to a console. The logging messages + are forwarded to Qt's logging facilities inside a \c js + \l{QLoggingCategory}{logging category}. However, only warning and fatal + messages are printed by default. To change this, you either have to set custom + rules for the \c js category, or provide custom message handlers + by reimplementing \l{QWebEnginePage::javaScriptConsoleMessage()}, or + connecting to \l{WebEngineView::javaScriptConsoleMessage()}. + + All messages can also be accessed through the Qt WebEngine developer + tools. + + \section1 Qt WebEngine Developer Tools The Qt WebEngine module provides web developer tools that make it easy to inspect and debug layout and performance issues of any web content. diff --git a/src/webengine/doc/src/qtwebengine-index.qdoc b/src/webengine/doc/src/qtwebengine-index.qdoc index e67bd43fd..671425e75 100644 --- a/src/webengine/doc/src/qtwebengine-index.qdoc +++ b/src/webengine/doc/src/qtwebengine-index.qdoc @@ -70,7 +70,7 @@ \list \li \l{Qt WebEngine Overview} \li \l{Qt WebEngine Platform Notes} - \li \l{Qt WebEngine Web Developer Tools} + \li \l{Qt WebEngine Debugging and Profiling} \li \l{Porting from Qt WebKit to Qt WebEngine} \endlist diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc index 82bec2472..d1b4e722b 100644 --- a/src/webengine/doc/src/webengineview.qdoc +++ b/src/webengine/doc/src/webengineview.qdoc @@ -436,6 +436,8 @@ The corresponding handler is \c onJavaScriptConsoleMessage. If no handler is specified, the view will log the messages into a \c js \l{QLoggingCategory}{logging category}. + + \sa{Console Logging} */ /*! diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc index 9c07ce543..17dd15630 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -264,6 +264,8 @@ Since Qt 5.6, the default implementation logs the messages in a \c js \l{QLoggingCategory}{logging category}. + + \sa{Console Logging} */ /*! |