From 96c80416cf685f9eb7765d1befff93d85606fe2a Mon Sep 17 00:00:00 2001 From: Topi Reinio <topi.reinio@digia.com> Date: Thu, 8 Oct 2015 12:25:10 +0200 Subject: [PATCH] Doc: Use \qml for code snippets where possible QDoc's QML parser works OK for code snippets that include a full type declaration; use \qml for these snippets to get autolinking to QML types working. Use \badcode for codeblocks that are not code or have nothing to link to. Change-Id: Iffd2f356bf0b3efc854a3755873e66f8c9478cac Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> --- src/webengine/doc/src/qtwebengine-devtools.qdoc | 4 +++- src/webengine/doc/src/qtwebengine-overview.qdoc | 4 ++-- src/webengine/doc/src/qtwebengine-qmlmodule.qdoc | 2 +- src/webengine/doc/src/webengineview.qdoc | 16 ++++++++-------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/webengine/doc/src/qtwebengine-devtools.qdoc b/src/webengine/doc/src/qtwebengine-devtools.qdoc index 008fa925b..8d12e0eb0 100644 --- a/src/webengine/doc/src/qtwebengine-devtools.qdoc +++ b/src/webengine/doc/src/qtwebengine-devtools.qdoc @@ -37,9 +37,11 @@ To activate the developer tools, start an application that uses Qt WebEngine with the command-line arguments: - \code + + \badcode --remote-debugging-port=<port_number> \endcode + Where \c <port_number> refers to a local network port. The web developer tools can then be accessed by launching a browser at the address \c http://localhost:<port_number>. diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc index fb2db9501..11d939cf8 100644 --- a/src/webengine/doc/src/qtwebengine-overview.qdoc +++ b/src/webengine/doc/src/qtwebengine-overview.qdoc @@ -104,7 +104,7 @@ The following sample QML application loads a web page and responds to session history context: - \code + \qml import QtQuick 2.1 import QtQuick.Controls 1.1 import QtWebEngine 1.1 @@ -119,7 +119,7 @@ anchors.fill: parent } } - \endcode + \endqml \section1 Using WebEngine Core diff --git a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc index 6d3d71896..e098071b3 100644 --- a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc +++ b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc @@ -32,7 +32,7 @@ The QML types can be imported into your application using the following import statements in your .qml file: - \code + \badcode import QtQuick 2.0 import QtWebEngine 1.1 \endcode diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc index b734413ea..99bec5350 100644 --- a/src/webengine/doc/src/webengineview.qdoc +++ b/src/webengine/doc/src/webengineview.qdoc @@ -104,13 +104,13 @@ The following snippet uses the \c{icon} property to build an \c{Image} component: - \code + \qml Image { id: appIcon source: webView.icon != "" ? webView.icon : "fallbackFavIcon.png"; - ... + // ... } - \endcode + \endqml */ /*! @@ -311,7 +311,7 @@ Immediately sets \c{isFullScreen} property to \c{false}. It can be used to notify the browser engine when the windowing system forces the application to leave fullscreen mode. - \code + \qml ApplicationWindow { onVisibilityChanged: { if (webEngineView.isFullScreen && visibility != Window.FullScreen) @@ -320,10 +320,10 @@ WebEngineView { id: webEngineView - ... + // ... } } - \endcode + \endqml \sa isFullScreen, fullScreenRequested() */ @@ -708,7 +708,7 @@ Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen property to be equal to toggleOn. - \code + \qml ApplicationWindow { id: window WebEngineView { @@ -721,7 +721,7 @@ } } } - \endcode + \endqml \sa toggleOn */ -- GitLab