From 8318548b32134203a6a74029312da5cdff484a35 Mon Sep 17 00:00:00 2001
From: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Date: Tue, 6 Oct 2015 17:07:08 +0200
Subject: [PATCH] Doc: remove doc config file from Qt WebEngineWidgets
 submodule
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This helps maintaining the doc dependencies.

All Qt WebEngine module docs are now generated in the
/qtbase/doc/qtwebengine/ folder.

Note that you must run qmake -r for the docs to be generated
correctly after applying this patch.

Add Qt WebEngine C++ Classes page that lists the C++ classes
for the submodules.

Modify snippet and example paths accordingly.

Change-Id: I59431c5f766f30b59654ca4e2219b76c79137225
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
---
 .../doc/src/quicknanobrowser.qdoc             |  2 +-
 .../demobrowser/doc/src/demobrowser.qdoc      |  6 +--
 .../fancybrowser/doc/src/fancybrowser.qdoc    | 22 +++++-----
 src/webengine/api/qquickwebenginehistory.cpp  |  2 +-
 src/webengine/doc/qtwebengine.qdocconf        | 25 ++++++-----
 src/webengine/doc/src/qtwebengine-index.qdoc  |  3 +-
 .../doc/src/qtwebengine-modules.qdoc          | 42 ++++++++++++++++++
 .../doc/qtwebenginewidgets.qdocconf           | 43 -------------------
 .../doc/src/qtwebenginewidgets-module.qdoc    |  5 +++
 src/webenginewidgets/webenginewidgets.pro     |  2 -
 10 files changed, 78 insertions(+), 74 deletions(-)
 create mode 100644 src/webengine/doc/src/qtwebengine-modules.qdoc
 delete mode 100644 src/webenginewidgets/doc/qtwebenginewidgets.qdocconf

diff --git a/examples/webengine/quicknanobrowser/doc/src/quicknanobrowser.qdoc b/examples/webengine/quicknanobrowser/doc/src/quicknanobrowser.qdoc
index 4fac9fe09..211951929 100644
--- a/examples/webengine/quicknanobrowser/doc/src/quicknanobrowser.qdoc
+++ b/examples/webengine/quicknanobrowser/doc/src/quicknanobrowser.qdoc
@@ -26,7 +26,7 @@
 ****************************************************************************/
 
 /*!
-    \example quicknanobrowser
+    \example webengine/quicknanobrowser
     \title WebEngine Quick Nano Browser
     \ingroup webengine-examples
     \brief A web browser implemented using the WebEngineView QML type.
diff --git a/examples/webenginewidgets/demobrowser/doc/src/demobrowser.qdoc b/examples/webenginewidgets/demobrowser/doc/src/demobrowser.qdoc
index 1264606db..ba61dd79d 100644
--- a/examples/webenginewidgets/demobrowser/doc/src/demobrowser.qdoc
+++ b/examples/webenginewidgets/demobrowser/doc/src/demobrowser.qdoc
@@ -26,13 +26,13 @@
 ****************************************************************************/
 
 /*!
-    \example demobrowser
+    \example webenginewidgets/demobrowser
     \title WebEngine Demo Browser Example
     \ingroup webengine-widgetexamples
     \brief A demo browser based on Qt WebEngine Widgets
 
-    The Demo Browser example shows the \l{Qt WebEngine Widgets} module in action,
-    providing a little Web browser application with support for tabs.
+    \e {Demo Browser} demonstrates how to use the \l{Qt WebEngine Widgets C++ Classes}
+    {Qt WebEngine C++ classes} to develop a small Web browser application with support for tabs.
 
     \image browser-demo.png
 
diff --git a/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc b/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc
index e6c6ada34..b798e4832 100644
--- a/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc
+++ b/examples/webenginewidgets/fancybrowser/doc/src/fancybrowser.qdoc
@@ -26,7 +26,7 @@
 ****************************************************************************/
 
 /*!
-    \example fancybrowser
+    \example webenginewidgets/fancybrowser
     \title WebEngine Fancy Browser Example
     \ingroup webengine-widgetexamples
     \brief Demonstrates how to use browse web and manipulate content
@@ -48,7 +48,7 @@
     The \c MainWindow class inherits QMainWindow. It implements a number of
     slots to perform actions on both the application and on the web content.
 
-    \snippet fancybrowser/mainwindow.h 1
+    \snippet webenginewidgets/fancybrowser/mainwindow.h 1
 
     We also declare a QString that contains the jQuery, a QWebView
     that displays the web content, and a QLineEdit that acts as the
@@ -58,7 +58,7 @@
 
     We start by implementing the constructor.
 
-    \snippet fancybrowser/mainwindow.cpp 1
+    \snippet webenginewidgets/fancybrowser/mainwindow.cpp 1
 
     The first part of the constructor sets the value of \c progress to
     0. This value will be used later in the code to visualize the
@@ -68,7 +68,7 @@
     content. The jQuery library is a JavaScript library that provides different
     functions for manipulating HTML.
 
-    \snippet fancybrowser/mainwindow.cpp 2
+    \snippet webenginewidgets/fancybrowser/mainwindow.cpp 2
 
     The second part of the constructor creates a QWebView and connects
     slots to the views signals. Furthermore, we create a QLineEdit as
@@ -77,13 +77,13 @@
     QLineEdit to a QToolbar together with a set of navigation actions
     from QWebView::pageAction.
 
-    \snippet fancybrowser/mainwindow.cpp 3
+    \snippet webenginewidgets/fancybrowser/mainwindow.cpp 3
 
     The third and last part of the constructor implements two QMenus and assigns
     a set of actions to them. The last line sets the QWebView as the central
     widget in the QMainWindow.
 
-    \snippet fancybrowser/mainwindow.cpp 4
+    \snippet webenginewidgets/fancybrowser/mainwindow.cpp 4
 
     When the page is loaded, \c adjustLocation() updates the address
     bar; \c adjustLocation() is triggered by the \c loadFinished()
@@ -92,13 +92,13 @@
     the new web page has finished loading, \c adjustLocation() will be
     run once more to update the address bar.
 
-    \snippet fancybrowser/mainwindow.cpp 5
+    \snippet webenginewidgets/fancybrowser/mainwindow.cpp 5
 
     \c adjustTitle() sets the window title and displays the loading
     progress. This slot is triggered by the \c titleChanged() signal
     in QWebView.
 
-    \snippet fancybrowser/mainwindow.cpp 6
+    \snippet webenginewidgets/fancybrowser/mainwindow.cpp 6
 
     When a web page has loaded, \c finishLoading() is triggered by the
     \c loadFinished() signal in QWebView. \c finishLoading() then updates the
@@ -113,7 +113,7 @@
     that the images of the newly loaded page respect the state of the toggle
     action.
 
-    \snippet fancybrowser/mainwindow.cpp 7
+    \snippet webenginewidgets/fancybrowser/mainwindow.cpp 7
 
     The first jQuery-based function, \c highlightAllLinks(), is designed to
     highlight all links in the current webpage. The JavaScript code looks
@@ -121,14 +121,14 @@
     For each such element, the background color is set to be yellow by
     using CSS.
 
-    \snippet fancybrowser/mainwindow.cpp 8
+    \snippet webenginewidgets/fancybrowser/mainwindow.cpp 8
 
     The \c rotateImages() function rotates the images on the current
     web page. This JavaScript code relies on CSS transforms and
     looks up all \e {img} elements and rotates the images 180 degrees
     and then back again.
 
-    \snippet fancybrowser/mainwindow.cpp 9
+    \snippet webenginewidgets/fancybrowser/mainwindow.cpp 9
 
     The remaining four methods remove different elements from the current web
     page. \c removeGifImages() removes all GIF images on the page by looking up
diff --git a/src/webengine/api/qquickwebenginehistory.cpp b/src/webengine/api/qquickwebenginehistory.cpp
index 27081703b..483fa86f9 100644
--- a/src/webengine/api/qquickwebenginehistory.cpp
+++ b/src/webengine/api/qquickwebenginehistory.cpp
@@ -234,7 +234,7 @@ QQuickWebEngineHistoryPrivate::~QQuickWebEngineHistoryPrivate()
     The data models can also be used to create a menu, as illustrated by the following code
     snippet:
 
-    \quotefromfile quicknanobrowser/browserwindow.qml
+    \quotefromfile webengine/quicknanobrowser/browserwindow.qml
     \skipto ToolBar
     \printuntil onObjectRemoved
     \printuntil }
diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf
index f833cf0d2..e277f4190 100644
--- a/src/webengine/doc/qtwebengine.qdocconf
+++ b/src/webengine/doc/qtwebengine.qdocconf
@@ -4,7 +4,7 @@ project                 = QtWebEngine
 description             = Qt WebEngine Reference Documentation
 version                 = $QT_VERSION
 
-examplesinstallpath     = webengine
+examplesinstallpath     =
 
 qhp.projects            = QtWebEngine
 
@@ -44,21 +44,24 @@ depends += qtcore \
            qtquickcontrols \
            qtdoc \
            qtwebchannel \
-           qtwebenginewidgets
+           qtwidgets
 
-headerdirs  += . \
-               ../api \
-               ../../core/api
+headerdirs  += .. \
+               ../../core \
+               ../../webenginewidgets
 
-sourcedirs  += . \
-               ../api \
-               ../../core/api \
-               ../../core/doc/src
+sourcedirs  += .. \
+                ../../core/ \
+               ../../webenginewidgets \
 
 exampledirs +=  . \
-                ../../../examples/webengine \
+                ../../../examples \
                 snippets \
-                ../../core/doc/snippets
+                ../../core/doc/snippets \
+                ../../webenginewidgets/doc/snippets
+
+
+imagedirs += images
 
 navigation.landingpage = "Qt WebEngine"
 navigation.cppclassespage = "Qt WebEngine C++ Classes"
diff --git a/src/webengine/doc/src/qtwebengine-index.qdoc b/src/webengine/doc/src/qtwebengine-index.qdoc
index 2c3737b7d..e67bd43fd 100644
--- a/src/webengine/doc/src/qtwebengine-index.qdoc
+++ b/src/webengine/doc/src/qtwebengine-index.qdoc
@@ -84,8 +84,7 @@
     \section1 API References
 
     \list
-        \li \l{Qt WebEngine Core C++ Classes}
-        \li \l{Qt WebEngine Widgets C++ Classes}
+        \li \l{Qt WebEngine C++ Classes}
         \li \l{Qt WebEngine QML Types}
     \endlist
 */
diff --git a/src/webengine/doc/src/qtwebengine-modules.qdoc b/src/webengine/doc/src/qtwebengine-modules.qdoc
new file mode 100644
index 000000000..2e1b4c947
--- /dev/null
+++ b/src/webengine/doc/src/qtwebengine-modules.qdoc
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+    \page qtwebengine-modules.html
+    \title Qt WebEngine C++ Classes
+    \brief Provides functionality for rendering regions of dynamic web content.
+
+    \e {Qt WebEngine} provides functionality for rendering regions of dynamic web content.
+
+    \section1 Classes
+
+    \section2 Qt WebEngineCore Module
+    \generatelist {classesbymodule QtWebEngineCore}
+
+    \section2 Qt WebEngineWidgets Module
+    \generatelist {classesbymodule QtWebEngineWidgets}
+*/
diff --git a/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf b/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf
deleted file mode 100644
index 7b48b7a14..000000000
--- a/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf
+++ /dev/null
@@ -1,43 +0,0 @@
-include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
-
-project                 = QtWebEngineWidgets
-description             = Qt WebEngineWidgets Reference Documentation
-version                 = $QT_VERSION
-
-examplesinstallpath     = webenginewidgets
-
-qhp.projects            = QtWebEngineWidgets
-
-qhp.QtWebEngineWidgets.file                = qtwebenginewidgets.qhp
-qhp.QtWebEngineWidgets.namespace           = org.qt-project.qtwebenginewidgets.$QT_VERSION_TAG
-qhp.QtWebEngineWidgets.virtualFolder       = qtwebenginewidgets
-qhp.QtWebEngineWidgets.indexTitle          = Qt WebEngine Widgets
-qhp.QtWebEngineWidgets.indexRoot           =
-
-qhp.QtWebEngineWidgets.filterAttributes    = qtwebenginewidgets $QT_VERSION qtrefdoc
-qhp.QtWebEngineWidgets.customFilters.Qt.name = QtWebEngineWidgets $QT_VERSION
-qhp.QtWebEngineWidgets.customFilters.Qt.filterAttributes = qtwebenginewidgets $QT_VERSION
-qhp.QtWebEngineWidgets.subprojects         = classes examples
-qhp.QtWebEngineWidgets.subprojects.classes.title = C++ Classes
-qhp.QtWebEngineWidgets.subprojects.classes.indexTitle = Qt WebEngine Widgets C++ Classes
-qhp.QtWebEngineWidgets.subprojects.classes.selectors = class fake:headerfile
-qhp.QtWebEngineWidgets.subprojects.classes.sortPages = true
-qhp.QtWebEngineWidgets.subprojects.examples.title = Examples
-qhp.QtWebEngineWidgets.subprojects.examples.indexTitle = Qt WebEngine Widgets Examples
-qhp.QtWebEngineWidgets.subprojects.examples.selectors = fake:example
-qhp.QtWebEngineWidgets.subprojects.examples.sortPages = true
-
-tagfile                 = ../../../doc/qtwebenginewidgets/qtwebenginewidgets.tags
-
-depends += qtwebengine qtcore qtnetwork qtgui qtwidgets qtwebkit qtdoc qtwebchannel
-
-headerdirs  += ../api
-sourcedirs  += ../api src
-
-exampledirs += ../../../examples/webenginewidgets \
-               snippets
-
-navigation.landingpage = "Qt WebEngine Widgets"
-navigation.cppclassespage = "Qt WebEngine Widgets C++ Classes"
-
-Cpp.ignoretokens += QWEBENGINEWIDGETS_EXPORT
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
index 6373389f3..a9ef6ad8c 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
@@ -30,7 +30,12 @@
     \title Qt WebEngine Widgets C++ Classes
     \brief Provides a web browser engine as well as C++ classes to render and
     interact with web content
+    \ingroup modules
     \ingroup qtwebengine-modules
+    \qtvariable webenginewidgets
+
+    The Qt WebEngineWidgets module provides a web browser engine as well as C++ classes to render
+    and interact with web content.
 
     To include the definitions of the module's classes, use the
     following directive:
diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro
index c32185563..17a0a3dbb 100644
--- a/src/webenginewidgets/webenginewidgets.pro
+++ b/src/webenginewidgets/webenginewidgets.pro
@@ -6,8 +6,6 @@ DEFINES += QT_BUILD_WEBENGINEWIDGETS_LIB
 QT += webengine webenginecore widgets network quick
 QT_PRIVATE += quick-private gui-private core-private
 
-QMAKE_DOCS = $$PWD/doc/qtwebenginewidgets.qdocconf
-
 INCLUDEPATH += $$PWD api ../core ../core/api ../webengine/api
 
 SOURCES = \
-- 
GitLab