summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2018-10-16 14:54:36 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-01-21 11:40:35 +0000
commite85835c5a824c1979ace67aa3940c0fbdca40fd6 (patch)
treeae22fac7380308895c3d5142d7e73a6a1e6d88b0 /src/webengine
parent819182302d5bdaba41efb68ef3c533b2acc19ae1 (diff)
Add configure for webengine and webenginewidgets
Add possibility to build without widgets or qml support. Move module related options to webengine's subconfigure. Make proper dependencies between qml_module and qml_plugins. Cleanup headers. Fixes: QTBUG-68956 Task-number: QTBUG-70784 Change-Id: I4605d98b0d2c83c99af37e2186b5fbf10f8a6049 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebengineview.cpp1
-rw-r--r--src/webengine/api/qquickwebengineview_p.h1
-rw-r--r--src/webengine/api/qtwebengineglobal.h1
-rw-r--r--src/webengine/api/qtwebengineglobal_p.h4
-rw-r--r--src/webengine/configure.json29
-rw-r--r--src/webengine/module.pro90
-rw-r--r--src/webengine/plugin/plugin.cpp31
-rw-r--r--src/webengine/plugin/plugin.pro4
-rw-r--r--src/webengine/testsupport/plugin.cpp (renamed from src/webengine/plugin/testsupport/plugin.cpp)2
-rw-r--r--src/webengine/testsupport/qmldir (renamed from src/webengine/plugin/testsupport/qmldir)0
-rw-r--r--src/webengine/testsupport/testsupport.pro (renamed from src/webengine/plugin/testsupport/testsupport.pro)4
-rw-r--r--src/webengine/webengine.pro92
12 files changed, 152 insertions, 107 deletions
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 3659f35fa..353f55974 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -39,7 +39,6 @@
#include "qquickwebengineview_p.h"
#include "qquickwebengineview_p_p.h"
-#include "qtwebenginecoreglobal_p.h"
#include "authentication_dialog_controller.h"
#include "profile_adapter.h"
#include "certificate_error_controller.h"
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index ae92b6df0..2528be3f8 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -51,7 +51,6 @@
// We mean it.
//
-#include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h>
#include <QtWebEngine/private/qtwebengineglobal_p.h>
#include "qquickwebenginescript.h"
#include <QQuickItem>
diff --git a/src/webengine/api/qtwebengineglobal.h b/src/webengine/api/qtwebengineglobal.h
index 2d83be674..c2b33778a 100644
--- a/src/webengine/api/qtwebengineglobal.h
+++ b/src/webengine/api/qtwebengineglobal.h
@@ -41,6 +41,7 @@
#define QTWEBENGINEGLOBAL_H
#include <QtCore/qglobal.h>
+#include <QtWebEngine/qtwebengine-config.h>
QT_BEGIN_NAMESPACE
diff --git a/src/webengine/api/qtwebengineglobal_p.h b/src/webengine/api/qtwebengineglobal_p.h
index 7058bef09..2d30f75b0 100644
--- a/src/webengine/api/qtwebengineglobal_p.h
+++ b/src/webengine/api/qtwebengineglobal_p.h
@@ -51,7 +51,9 @@
// We mean it.
//
-#include "qtwebengineglobal.h"
+#include <QtWebEngine/qtwebengineglobal.h>
+#include <QtCore/private/qglobal_p.h>
+#include <QtWebEngine/private/qtwebengine-config_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/webengine/configure.json b/src/webengine/configure.json
new file mode 100644
index 000000000..ec5ad34d9
--- /dev/null
+++ b/src/webengine/configure.json
@@ -0,0 +1,29 @@
+{
+ "module": "webengine",
+ "depends": [
+ "webenginecore-private"
+ ],
+ "features": {
+ "webengine-ui-delegates": {
+ "label": "UI Delegates",
+ "section": "WebEngine",
+ "output": [ "privateFeature" ]
+ },
+ "webengine-testsupport": {
+ "label": "Test Support",
+ "autoDetect": "features.private_tests || call.isTestsInBuildParts",
+ "output": [ "privateFeature" ]
+ }
+ },
+ "summary": [
+ {
+ "section": "Qt WebEngineQml",
+ "condition": "features.webengine-qml",
+ "entries": [
+ "webengine-ui-delegates",
+ "webengine-testsupport"
+ ]
+ }
+ ]
+}
+
diff --git a/src/webengine/module.pro b/src/webengine/module.pro
new file mode 100644
index 000000000..b74d63d93
--- /dev/null
+++ b/src/webengine/module.pro
@@ -0,0 +1,90 @@
+include($$QTWEBENGINE_OUT_ROOT/src/webengine/qtwebengine-config.pri)
+QT_FOR_CONFIG += webengine-private
+
+TARGET = QtWebEngine
+MODULE = webengine
+
+# For our export macros
+DEFINES += QT_BUILD_WEBENGINE_LIB
+
+QT += qml quick webenginecore
+QT_PRIVATE += quick-private gui-private core-private webenginecore-private
+
+QMAKE_DOCS = $$PWD/doc/qtwebengine.qdocconf
+
+INCLUDEPATH += $$PWD api ../core ../core/api
+
+SOURCES = \
+ api/qquickwebengineaction.cpp \
+ api/qquickwebenginecertificateerror.cpp \
+ api/qquickwebenginecontextmenurequest.cpp \
+ api/qquickwebenginedialogrequests.cpp \
+ api/qquickwebenginedownloaditem.cpp \
+ api/qquickwebenginehistory.cpp \
+ api/qquickwebenginefaviconprovider.cpp \
+ api/qquickwebengineloadrequest.cpp \
+ api/qquickwebenginenavigationrequest.cpp \
+ api/qquickwebenginenewviewrequest.cpp \
+ api/qquickwebengineprofile.cpp \
+ api/qquickwebenginescript.cpp \
+ api/qquickwebenginesettings.cpp \
+ api/qquickwebenginesingleton.cpp \
+ api/qquickwebengineview.cpp \
+ api/qtwebengineglobal.cpp \
+ render_widget_host_view_qt_delegate_quick.cpp \
+ render_widget_host_view_qt_delegate_quickwindow.cpp \
+ ui_delegates_manager.cpp
+
+HEADERS = \
+ api/qtwebengineglobal.h \
+ api/qtwebengineglobal_p.h \
+ api/qquickwebengineaction_p.h \
+ api/qquickwebengineaction_p_p.h \
+ api/qquickwebenginecertificateerror_p.h \
+ api/qquickwebenginecontextmenurequest_p.h \
+ api/qquickwebenginedialogrequests_p.h \
+ api/qquickwebenginedownloaditem_p.h \
+ api/qquickwebenginedownloaditem_p_p.h \
+ api/qquickwebenginehistory_p.h \
+ api/qquickwebenginefaviconprovider_p_p.h \
+ api/qquickwebengineloadrequest_p.h \
+ api/qquickwebenginenavigationrequest_p.h \
+ api/qquickwebenginenewviewrequest_p.h \
+ api/qquickwebengineprofile.h \
+ api/qquickwebengineprofile_p.h \
+ api/qquickwebenginescript.h \
+ api/qquickwebenginescript_p.h \
+ api/qquickwebenginesettings_p.h \
+ api/qquickwebenginesingleton_p.h \
+ api/qquickwebengineview_p.h \
+ api/qquickwebengineview_p_p.h \
+ render_widget_host_view_qt_delegate_quick.h \
+ render_widget_host_view_qt_delegate_quickwindow.h \
+ ui_delegates_manager.h
+
+qtConfig(webengine-testsupport) {
+ QT_PRIVATE += testlib
+ SOURCES += api/qquickwebenginetestsupport.cpp
+ HEADERS += api/qquickwebenginetestsupport_p.h
+}
+
+!build_pass {
+ python = $$pythonPathForShell()
+ chromium_attributions.commands = \
+ cd $$shell_quote($$shell_path($$PWD/../3rdparty)) && \
+ $$python chromium/tools/licenses.py \
+ --file-template ../../tools/about_credits.tmpl \
+ --entry-template ../../tools/about_credits_entry.tmpl credits \
+ $$shell_quote($$shell_path($$OUT_PWD/chromium_attributions.qdoc))
+ chromium_attributions.CONFIG += phony
+
+ QMAKE_EXTRA_TARGETS += chromium_attributions
+
+ prepare_docs {
+ prepare_docs.depends += chromium_attributions
+ } else {
+ html_docs.depends += chromium_attributions
+ }
+}
+
+load(qt_module)
diff --git a/src/webengine/plugin/plugin.cpp b/src/webengine/plugin/plugin.cpp
index 16f1bd593..9fab3e9ce 100644
--- a/src/webengine/plugin/plugin.cpp
+++ b/src/webengine/plugin/plugin.cpp
@@ -40,22 +40,21 @@
#include <QtQml/qqmlextensionplugin.h>
#include <QtWebEngine/QQuickWebEngineProfile>
-#include "qquickwebenginecertificateerror_p.h"
-#include "qquickwebenginecontextmenurequest_p.h"
-#include "qquickwebenginedialogrequests_p.h"
-#include "qquickwebenginedownloaditem_p.h"
-#include "qquickwebenginehistory_p.h"
-#include "qquickwebenginefaviconprovider_p_p.h"
-#include "qquickwebengineloadrequest_p.h"
-#include "qquickwebenginenavigationrequest_p.h"
-#include "qquickwebenginenewviewrequest_p.h"
-#include "qquickwebenginesettings_p.h"
-#include "qquickwebenginesingleton_p.h"
-#include "qquickwebengineview_p.h"
-#include "qquickwebengineaction_p.h"
-#include "qwebenginequotarequest.h"
-#include "qwebengineregisterprotocolhandlerrequest.h"
-#include "qtwebengineversion.h"
+#include <QtWebEngine/private/qquickwebenginecertificateerror_p.h>
+#include <QtWebEngine/private/qquickwebenginecontextmenurequest_p.h>
+#include <QtWebEngine/private/qquickwebenginedialogrequests_p.h>
+#include <QtWebEngine/private/qquickwebenginedownloaditem_p.h>
+#include <QtWebEngine/private/qquickwebenginehistory_p.h>
+#include <QtWebEngine/private/qquickwebenginefaviconprovider_p_p.h>
+#include <QtWebEngine/private/qquickwebengineloadrequest_p.h>
+#include <QtWebEngine/private/qquickwebenginenavigationrequest_p.h>
+#include <QtWebEngine/private/qquickwebenginenewviewrequest_p.h>
+#include <QtWebEngine/private/qquickwebenginesettings_p.h>
+#include <QtWebEngine/private/qquickwebenginesingleton_p.h>
+#include <QtWebEngine/private/qquickwebengineview_p.h>
+#include <QtWebEngine/private/qquickwebengineaction_p.h>
+#include <QtWebEngineCore/qwebenginequotarequest.h>
+#include <QtWebEngineCore/qwebengineregisterprotocolhandlerrequest.h>
QT_BEGIN_NAMESPACE
diff --git a/src/webengine/plugin/plugin.pro b/src/webengine/plugin/plugin.pro
index b6652fa26..c3702e81d 100644
--- a/src/webengine/plugin/plugin.pro
+++ b/src/webengine/plugin/plugin.pro
@@ -3,11 +3,9 @@ TARGET = qtwebengineplugin
TARGETPATH = QtWebEngine
IMPORT_VERSION = 1.8
-QT += webengine qml quick
+QT += qml quick
QT_PRIVATE += core-private webenginecore-private webengine-private
-INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/core/api $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api $$QTWEBENGINE_ROOT/include/QtWebEngine
-
SOURCES = plugin.cpp
load(qml_plugin)
diff --git a/src/webengine/plugin/testsupport/plugin.cpp b/src/webengine/testsupport/plugin.cpp
index d5c43a859..7a1e73d8b 100644
--- a/src/webengine/plugin/testsupport/plugin.cpp
+++ b/src/webengine/testsupport/plugin.cpp
@@ -39,7 +39,7 @@
#include <QtQml>
-#include "qquickwebenginetestsupport_p.h"
+#include <QtWebEngine/private/qquickwebenginetestsupport_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/webengine/plugin/testsupport/qmldir b/src/webengine/testsupport/qmldir
index 7fff80251..7fff80251 100644
--- a/src/webengine/plugin/testsupport/qmldir
+++ b/src/webengine/testsupport/qmldir
diff --git a/src/webengine/plugin/testsupport/testsupport.pro b/src/webengine/testsupport/testsupport.pro
index 2804635f8..a24796675 100644
--- a/src/webengine/plugin/testsupport/testsupport.pro
+++ b/src/webengine/testsupport/testsupport.pro
@@ -3,11 +3,9 @@ TARGET = qtwebenginetestsupportplugin
TARGETPATH = QtWebEngine/testsupport
IMPORT_VERSION = 1.0
-QT += webengine qml quick
+QT += qml quick
QT_PRIVATE += webengine-private gui-private
-INCLUDEPATH += $$QTWEBENGINE_ROOT/src/core $$QTWEBENGINE_ROOT/src/webengine $$QTWEBENGINE_ROOT/src/webengine/api
-
SOURCES = plugin.cpp
load(qml_plugin)
diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro
index 418ade9a8..23668229e 100644
--- a/src/webengine/webengine.pro
+++ b/src/webengine/webengine.pro
@@ -1,89 +1,19 @@
-include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093
-QT_FOR_CONFIG += webenginecore-private
+TEMPLATE = subdirs
-TARGET = QtWebEngine
+qml_module.file = module.pro
+qml_plugin.file = plugin/plugin.pro
-# For our export macros
-DEFINES += QT_BUILD_WEBENGINE_LIB
+qml_plugin.depends = qml_module
-QT += qml quick webenginecore
-QT_PRIVATE += quick-private gui-private core-private webenginecore-private
-
-QMAKE_DOCS = $$PWD/doc/qtwebengine.qdocconf
-
-INCLUDEPATH += $$PWD api ../core ../core/api
-
-SOURCES = \
- api/qquickwebengineaction.cpp \
- api/qquickwebenginecertificateerror.cpp \
- api/qquickwebenginecontextmenurequest.cpp \
- api/qquickwebenginedialogrequests.cpp \
- api/qquickwebenginedownloaditem.cpp \
- api/qquickwebenginehistory.cpp \
- api/qquickwebenginefaviconprovider.cpp \
- api/qquickwebengineloadrequest.cpp \
- api/qquickwebenginenavigationrequest.cpp \
- api/qquickwebenginenewviewrequest.cpp \
- api/qquickwebengineprofile.cpp \
- api/qquickwebenginescript.cpp \
- api/qquickwebenginesettings.cpp \
- api/qquickwebenginesingleton.cpp \
- api/qquickwebengineview.cpp \
- api/qtwebengineglobal.cpp \
- render_widget_host_view_qt_delegate_quick.cpp \
- render_widget_host_view_qt_delegate_quickwindow.cpp \
- ui_delegates_manager.cpp
-
-HEADERS = \
- api/qtwebengineglobal.h \
- api/qtwebengineglobal_p.h \
- api/qquickwebengineaction_p.h \
- api/qquickwebengineaction_p_p.h \
- api/qquickwebenginecertificateerror_p.h \
- api/qquickwebenginecontextmenurequest_p.h \
- api/qquickwebenginedialogrequests_p.h \
- api/qquickwebenginedownloaditem_p.h \
- api/qquickwebenginedownloaditem_p_p.h \
- api/qquickwebenginehistory_p.h \
- api/qquickwebenginefaviconprovider_p_p.h \
- api/qquickwebengineloadrequest_p.h \
- api/qquickwebenginenavigationrequest_p.h \
- api/qquickwebenginenewviewrequest_p.h \
- api/qquickwebengineprofile.h \
- api/qquickwebengineprofile_p.h \
- api/qquickwebenginescript.h \
- api/qquickwebenginescript_p.h \
- api/qquickwebenginesettings_p.h \
- api/qquickwebenginesingleton_p.h \
- api/qquickwebengineview_p.h \
- api/qquickwebengineview_p_p.h \
- render_widget_host_view_qt_delegate_quick.h \
- render_widget_host_view_qt_delegate_quickwindow.h \
- ui_delegates_manager.h
+SUBDIRS += qml_module qml_plugin
qtConfig(webengine-testsupport) {
- QT_PRIVATE += testlib
- SOURCES += api/qquickwebenginetestsupport.cpp
- HEADERS += api/qquickwebenginetestsupport_p.h
+ testsupport_plugin.file = testsupport/testsupport.pro
+ testsupport_plugin.depends = qml_module
+ SUBDIRS += testsupport_plugin
}
-!build_pass {
- python = $$pythonPathForShell()
- chromium_attributions.commands = \
- cd $$shell_quote($$shell_path($$PWD/../3rdparty)) && \
- $$python chromium/tools/licenses.py \
- --file-template ../../tools/about_credits.tmpl \
- --entry-template ../../tools/about_credits_entry.tmpl credits \
- $$shell_quote($$shell_path($$OUT_PWD/chromium_attributions.qdoc))
- chromium_attributions.CONFIG += phony
-
- QMAKE_EXTRA_TARGETS += chromium_attributions
-
- prepare_docs {
- prepare_docs.depends += chromium_attributions
- } else {
- html_docs.depends += chromium_attributions
- }
+qtConfig(webengine-ui-delegates) {
+ SUBDIRS += ui \
+ ui2
}
-
-load(qt_module)