diff options
56 files changed, 834 insertions, 870 deletions
diff --git a/configure.json b/configure.json index f0d6391b9..40d6bfe56 100644 --- a/configure.json +++ b/configure.json @@ -1,722 +1,5 @@ { - "module": "webengine", - "depends": [ - "core-private", - "gui-private", - "printsupport" - ], - - "commandline": { - "options": { - "webengine-alsa": "boolean", - "webengine-embedded-build": "boolean", - "webengine-icu": { "type": "enum", "name": "webengine-system-icu", "values": { "system": "yes", "qt": "no" } }, - "webengine-ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } }, - "webengine-opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } }, - "webengine-webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } }, - "webengine-pepper-plugins": "boolean", - "webengine-printing-and-pdf": "boolean", - "webengine-proprietary-codecs": "boolean", - "webengine-pulseaudio": "boolean", - "webengine-spellchecker": "boolean", - "webengine-native-spellchecker": "boolean", - "webengine-webrtc": "boolean", - "webengine-geolocation": "boolean", - "webengine-v8-snapshot": "boolean", - "alsa": { "type": "boolean", "name": "webengine-alsa" }, - "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" }, - "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } }, - "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } }, - "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } }, - "pepper-plugins": { "type": "boolean", "name": "webengine-pepper-plugins" }, - "printing-and-pdf": { "type": "boolean", "name": "webengine-printing-and-pdf" }, - "proprietary-codecs": { "type": "boolean", "name": "webengine-proprietary-codecs" }, - "spellchecker": { "type": "boolean", "name": "webengine-spellchecker" }, - "webrtc": { "type": "boolean", "name": "webengine-webrtc" } - } - }, - - "libraries": { - "webengine-dbus": { - "label": "d-bus", - "sources": [ - { "type": "pkgConfig", "args": "dbus-1" } - ] - }, - "webengine-fontconfig": { - "label": "fontconfig", - "sources": [ - { "type": "pkgConfig", "args": "fontconfig" } - ] - }, - "webengine-libdrm": { - "label": "libdrm", - "sources": [ - { "type": "pkgConfig", "args": "libdrm" } - ] - }, - "webengine-xcomposite": { - "label": "xcomposite", - "sources": [ - { "type": "pkgConfig", "args": "xcomposite" } - ] - }, - "webengine-xcursor": { - "label": "xcursor", - "sources": [ - { "type": "pkgConfig", "args": "xcursor" } - ] - }, - "webengine-xi": { - "label": "xi", - "sources": [ - { "type": "pkgConfig", "args": "xi" } - ] - }, - "webengine-xrandr": { - "label": "xrandr", - "sources": [ - { "type": "pkgConfig", "args": "xrandr" } - ] - }, - "webengine-xtst": { - "label": "xtst", - "sources": [ - { "type": "pkgConfig", "args": "xtst" } - ] - }, - "webengine-harfbuzz": { - "label": "harfbuzz >= 1.4.2", - "sources": [ - { "type": "pkgConfig", "args": "harfbuzz >= 1.4.2" } - ] - }, - "webengine-glib": { - "label": "glib-2.0 >= 2.32.0", - "sources": [ - { "type": "pkgConfig", "args": "glib-2.0 >= 2.32.0" } - ] - }, - "webengine-zlib": { - "label": "zlib", - "sources": [ - { "type": "pkgConfig", "args": "zlib" } - ] - }, - "webengine-minizip": { - "label": "minizip", - "sources": [ - { "type": "pkgConfig", "args": "minizip" } - ] - }, - "webengine-libevent": { - "label": "libevent", - "sources": [ - { "type": "pkgConfig", "args": "libevent" } - ] - }, - "webengine-libxml2": { - "label": "libxml2 and libxslt", - "sources": [ - { "type": "pkgConfig", "args": "libxml-2.0 libxslt" } - ] - }, - "webengine-jsoncpp": { - "label": "jsoncpp", - "sources": [ - { "type": "pkgConfig", "args": "jsoncpp" } - ] - }, - "webengine-protobuf": { - "label": "protobuf", - "sources": [ - { "type": "pkgConfig", "args": "protobuf" } - ] - }, - "pulseaudio": { - "label": "pulseaudio >= 0.9.10", - "sources": [ - { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" } - ] - }, - "webengine-icu": { - "label": "icu >= 53", - "sources": [ - { "type": "pkgConfig", "args": "icu-uc >= 53 icu-i18n >= 53" } - ] - }, - "webengine-ffmpeg": { - "label": "libavcodec libavformat libavutil", - "sources": [ - { "type": "pkgConfig", "args": "libavcodec libavformat libavutil" } - ] - }, - "webengine-opus": { - "label": "opus", - "sources": [ - { "type": "pkgConfig", "args": "opus" } - ] - }, - "webengine-webp": { - "label": "libwebp, libwebpmux and libwebpdemux", - "sources": [ - { "type": "pkgConfig", "args": "libwebp libwebpmux libwebpdemux" } - ] - }, - "webengine-nss": { - "label": "nss", - "sources": [ - { "type": "pkgConfig", "args": "nss" } - ] - }, - "webengine-png": { - "label": "libpng >= 1.6.0", - "sources": [ - { "type": "pkgConfig", "args": "libpng >= 1.6.0" } - ] - }, - "webengine-jpeglib": { - "label": "compatible jpeglib", - "type": "compile", - "test": { - "head": [ - "#include <cstdio>", - "#include <cstring>", - "extern \"C\" {", - " #include <jpeglib.h>", - "}" - ], - "main": [ - "JDIMENSION dummy;", - "jpeg_crop_scanline(nullptr, &dummy, &dummy);", - "jpeg_skip_scanlines(nullptr, dummy);" - ] - }, - "sources": [ - { "type": "pkgConfig", "args": "libjpeg" }, - "-ljpeg" - ] - }, - "webengine-lcms2": { - "label": "lcms2", - "sources": [ - { "type": "pkgConfig", "args": "lcms2" } - ] - } - }, - - "tests" : { - "webengine-alsa": { - "label": "alsa", - "test": "alsa", - "type": "compile" - }, - "webengine-host-compiler": { - "label": "host compiler", - "test": "hostcompiler", - "host": "true", - "type": "compile" - }, - "webengine-khr": { - "label": "khr", - "test": "khr", - "type": "compile" - }, - "webengine-libvpx": { - "label": "libvpx", - "test": "libvpx", - "type": "compile" - }, - "webengine-snappy": { - "label": "snappy", - "test": "snappy", - "type": "compile" - }, - "webengine-srtp": { - "label": "srtp", - "test": "srtp", - "type": "compile" - }, - "webengine-winversion": { - "label": "winversion", - "test": "winversion", - "type": "compile" - }, - "webengine-protoc": { - "label": "protoc", - "type": "detectProtoc" - }, - "webengine-python2": { - "label": "python2", - "type": "detectPython2", - "log": "location" - }, - "webengine-host-pkg-config": { - "label": "host pkg-config", - "type": "detectHostPkgConfig", - "log": "path" - }, - "webengine-gperf": { - "label": "gperf", - "type": "detectGperf" - }, - "webengine-bison": { - "label": "bison", - "type": "detectBison" - }, - "webengine-flex": { - "label": "flex", - "type": "detectFlex" - }, - "webengine-ninja": { - "label": "system ninja", - "type": "detectNinja" - }, - "webengine-gn": { - "label": "system gn", - "type": "detectGn" - }, - "webengine-embedded-build": { - "label": "embedded", - "type": "embedded" - }, - "webengine-re2": { - "label": "re2", - "test": "re2", - "type": "compile" - }, - "webengine-glibc": { - "label": "glibc > 2.16", - "type": "detectGlibc" - }, - "webengine-libxml2-compatible": { - "label" : "compatible system libxml2", - "test" : "xml2", - "type": "compile" - }, - "webengine-sanitizer": { - "label" : "sanitizer support", - "type": "isSanitizerSupported" - } - }, - - "features": { - "webengine-system-fontconfig": { - "label": "fontconfig", - "condition": "libs.webengine-fontconfig", - "output": [ "privateFeature" ] - }, - "webengine-system-dbus": { - "label": "dbus", - "condition": "libs.webengine-dbus", - "output": [ "privateFeature" ] - }, - "webengine-system-libdrm": { - "label": "libdrm", - "condition": "libs.webengine-libdrm", - "output": [ "privateFeature" ] - }, - "webengine-system-xcomposite": { - "label": "xcomposite", - "condition": "libs.webengine-xcomposite", - "output": [ "privateFeature" ] - }, - "webengine-system-xcursor": { - "label": "xcursor", - "condition": "libs.webengine-xcursor", - "output": [ "privateFeature" ] - }, - "webengine-system-xi": { - "label": "xi", - "condition": "libs.webengine-xi", - "output": [ "privateFeature" ] - }, - "webengine-system-xrandr": { - "label": "xrandr", - "condition": "libs.webengine-xrandr", - "output": [ "privateFeature" ] - }, - "webengine-system-xtst": { - "label": "xtst", - "condition": "libs.webengine-xtst", - "output": [ "privateFeature" ] - }, - "webengine-system-harfbuzz": { - "label": "harfbuzz", - "condition": "config.unix && features.system-harfbuzz && libs.webengine-harfbuzz", - "output": [ "privateFeature" ] - }, - "webengine-system-glib" : { - "label": "glib", - "condition": "config.unix && libs.webengine-glib", - "output": [ "privateFeature" ] - }, - "webengine-system-minizip" : { - "label": "minizip", - "condition": "config.unix && libs.webengine-minizip", - "output": [ "privateFeature" ] - }, - "webengine-system-zlib" : { - "label": "zlib", - "condition": "config.unix && features.system-zlib && libs.webengine-zlib", - "output": [ "privateFeature" ] - }, - "webengine-system-libevent" : { - "label": "libevent", - "condition": "config.unix && libs.webengine-libevent", - "output": [ "privateFeature" ] - }, - "webengine-system-jsoncpp" : { - "label": "jsoncpp", - "condition": "config.unix && libs.webengine-jsoncpp", - "output": [ "privateFeature" ] - }, - "webengine-system-protobuf" : { - "label": "protobuf", - "condition": "config.unix && libs.webengine-protobuf && tests.webengine-protoc", - "output": [ "privateFeature" ] - }, - "webengine-system-png" : { - "label": "png", - "condition": "config.unix && features.system-png && libs.webengine-png", - "output": [ "privateFeature" ] - }, - "webengine-system-jpeg" : { - "label": "JPEG", - "condition": "config.unix && features.system-jpeg && libs.webengine-jpeglib", - "output": [ "privateFeature" ] - }, - "webengine-python2": { - "label": "python2", - "condition": "tests.webengine-python2", - "output": [ - "privateFeature", - { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } - ] - }, - "webengine-host-pkg-config": { - "label": "host-pkg-config", - "condition": "config.unix && tests.webengine-host-pkg-config", - "output": [ - "privateFeature", - { "type": "varAssign", "name": "QMAKE_PKG_CONFIG_HOST", "value": "tests.webengine-host-pkg-config.path" } - ] - }, - "webengine-gperf": { - "label": "gperf", - "condition": "tests.webengine-gperf", - "output": [ "privateFeature" ] - }, - "webengine-bison": { - "label": "bison", - "condition": "tests.webengine-bison", - "output": [ "privateFeature" ] - }, - "webengine-flex": { - "label": "flex", - "condition": "tests.webengine-flex", - "output": [ "privateFeature" ] - }, - "webengine-embedded-build": { - "label": "Embedded build", - "purpose": "Enables the embedded build configuration.", - "section": "WebEngine", - "condition": "config.unix", - "autoDetect": "tests.webengine-embedded-build", - "output": [ "privateFeature" ] - }, - "webengine-alsa": { - "label": "Use ALSA", - "condition": "config.unix && tests.webengine-alsa", - "output": [ "privateFeature" ] - }, - "webengine-v8-snapshot": { - "label" : "Use v8 snapshot", - "purpose": "Enables the v8 snapshot, for fast v8 context creation", - "output": [ "privateFeature" ] - }, - "webengine-v8-snapshot-support": { - "label" : "Building v8 snapshot supported", - "autoDetect": "features.webengine-v8-snapshot", - "condition": "!config.unix || !features.cross_compile || arch.arm64 || tests.webengine-host-compiler", - "output": [ "privateFeature" ] - }, - "webengine-system-khr" : { - "label": "khr", - "condition": "config.unix && tests.webengine-khr", - "output": [ "privateFeature" ] - }, - "webengine-system-libvpx" : { - "label": "libvpx", - "condition": "config.unix && tests.webengine-libvpx", - "output": [ "privateFeature" ] - }, - "webengine-system-snappy" : { - "label": "snappy", - "condition": "config.unix && tests.webengine-snappy", - "output": [ "privateFeature" ] - }, - "webengine-system-libsrtp" : { - "label": "libsrtp", - "condition": "config.unix && tests.webengine-srtp", - "output": [ "privateFeature" ] - }, - "webengine-winversion" : { - "label": "winversion", - "condition": "config.win32 && tests.webengine-winversion", - "output": [ "privateFeature" ] - }, - "webengine-geolocation": { - "label": "Geolocation", - "condition": "module.positioning", - "output": [ "privateFeature" ] - }, - "webengine-pulseaudio": { - "label": "Use PulseAudio", - "autoDetect": "config.unix", - "condition": "libs.pulseaudio", - "output": [ "privateFeature" ] - }, - "webengine-pepper-plugins": { - "label": "Pepper Plugins", - "purpose": "Enables use of Pepper Flash and Widevine plugins.", - "section": "WebEngine", - "autoDetect": "!features.webengine-embedded-build", - "output": [ "privateFeature" ] - }, - "webengine-printing-and-pdf": { - "label": "Printing and PDF", - "purpose": "Provides printing and output to PDF.", - "section": "WebEngine", - "condition": "module.printsupport && features.printer", - "autoDetect": "!features.webengine-embedded-build", - "output": [ "privateFeature" ] - }, - "webengine-proprietary-codecs": { - "label": "Proprietary Codecs", - "purpose": "Enables the use of proprietary codecs such as h.264/h.265 and MP3.", - "section": "WebEngine", - "autoDetect": false, - "output": [ "privateFeature" ] - }, - "webengine-spellchecker": { - "label": "Spellchecker", - "purpose": "Provides a spellchecker.", - "section": "WebEngine", - "output": [ "publicFeature" ] - }, - "webengine-native-spellchecker": { - "label": "Native Spellchecker", - "purpose": "Use the system's native spellchecking engine.", - "section": "WebEngine", - "autoDetect": false, - "condition": "config.macos && features.webengine-spellchecker", - "output": [ "publicFeature" ] - }, - "webengine-ui-delegates": { - "label": "UI Delegates", - "output": [ "privateFeature" ] - }, - "webengine-testsupport": { - "label": "Test Support", - "autoDetect": "features.private_tests || call.isTestsInBuildParts", - "output": [ "privateFeature" ] - }, - "webengine-webrtc": { - "label": "WebRTC", - "purpose": "Provides WebRTC support.", - "section": "WebEngine", - "autoDetect": "!features.webengine-embedded-build", - "output": [ "privateFeature" ] - }, - "webengine-system-nss": { - "label": "nss", - "condition": "config.unix && !config.darwin && libs.webengine-nss", - "output": [ "privateFeature" ] - }, - "webengine-system-libwebp": { - "label": "libwebp, libwebpmux and libwebpdemux", - "autoDetect": "config.unix", - "condition": "libs.webengine-webp", - "output": [ "privateFeature" ] - }, - "webengine-system-opus": { - "label": "opus", - "autoDetect": "config.unix", - "condition": "libs.webengine-opus", - "output": [ "privateFeature" ] - }, - "webengine-system-ffmpeg": { - "label": "ffmpeg", - "autoDetect": false, - "condition": "libs.webengine-ffmpeg && features.webengine-system-opus && features.webengine-system-libwebp", - "output": [ "privateFeature" ] - }, - "webengine-system-icu": { - "label": "icu", - "autoDetect": false, - "condition": "libs.webengine-icu", - "output": [ "privateFeature" ] - }, - "webengine-system-re2": { - "label": "re2", - "autoDetect": "config.unix", - "condition": "tests.webengine-re2", - "output": [ "privateFeature" ] - }, - "webengine-system-ninja": { - "label": "Use System Ninja", - "condition": "tests.webengine-ninja", - "output": [ "privateFeature" ] - }, - "webengine-system-gn": { - "label": "Use System Gn", - "autoDetect": false, - "condition": "tests.webengine-gn", - "output": [ "privateFeature" ] - }, - "webengine-system-glibc": { - "label": "glibc", - "condition": "config.linux && tests.webengine-glibc", - "output": [ "privateFeature" ] - }, - "webengine-system-libxml2": { - "label": "libxml2 and libxslt", - "condition": "config.unix - && libs.webengine-libxml2 - && tests.webengine-libxml2-compatible", - "output": [ "privateFeature" ] - }, - "webengine-system-lcms2" : { - "label": "lcms2", - "autoDetect": "features.webengine-printing-and-pdf", - "condition": "config.unix && libs.webengine-lcms2", - "output": [ "privateFeature" ] - }, - "webengine-sanitizer" : { - "label": "Sanitizer", - "autoDetect": "config.sanitizer && tests.webengine-sanitizer", - "condition": "config.sanitizer", - "output": [ "privateFeature" ] - } - }, - - "report": [ - { - "type": "warning", - "condition": "!features.webengine-python2", - "message": "Python version 2 (2.7.5 or later) is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "!features.webengine-gperf", - "message": "gperf is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "!features.webengine-bison", - "message": "bison is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "!features.webengine-flex", - "message": "flex is required to build QtWebEngine." - }, - { - "type": "warning", - "condition": "config.sanitizer && !tests.webengine-sanitizer && !features.webengine-sanitizer", - "message": "Qt WebEngine cannot be built with the chosen sanitizer configuration. Check config.log for details or use -feature-webengine-sanitizer to force the build." - }, - { - "type": "warning", - "condition": "config.unix && !features.webengine-host-pkg-config", - "message": "host pkg-config not found" - } - ], - - "summary": [ - { - "section": "Qt WebEngine", - "entries": [ - "webengine-embedded-build", - "webengine-pepper-plugins", - "webengine-printing-and-pdf", - "webengine-proprietary-codecs", - "webengine-spellchecker", - "webengine-native-spellchecker", - "webengine-webrtc", - "webengine-system-ninja", - "webengine-geolocation", - "webengine-v8-snapshot", - { - "type": "feature", - "args": "webengine-v8-snapshot-support", - "condition": "config.unix && config.cross_compile && features.webengine-v8-snapshot" - }, - { - "type": "feature", - "args": "webengine-alsa", - "condition": "config.unix" - }, - { - "type": "feature", - "args": "webengine-pulseaudio", - "condition": "config.unix" - }, - { - "type": "feature", - "args": "webengine-sanitizer", - "condition": "config.sanitizer" - }, - { - "section": "Optional system libraries used", - "condition": "config.unix", - "entries": [ - "webengine-system-re2", - "webengine-system-icu", - "webengine-system-libwebp", - "webengine-system-opus", - "webengine-system-ffmpeg", - "webengine-system-libvpx", - "webengine-system-snappy", - "webengine-system-libsrtp", - "webengine-system-glib", - "webengine-system-zlib", - "webengine-system-minizip", - "webengine-system-libevent", - "webengine-system-jsoncpp", - "webengine-system-protobuf", - "webengine-system-libxml2", - "webengine-system-lcms2", - "webengine-system-png", - "webengine-system-jpeg", - "webengine-system-harfbuzz" - ] - }, - { - "section": "Required system libraries", - "condition": "config.unix && !config.macos", - "entries": [ - "webengine-system-fontconfig", - "webengine-system-dbus", - "webengine-system-nss", - "webengine-system-khr", - "webengine-system-glibc" - ] - }, - { - "section": "Required system libraries for qpa-xcb", - "condition": "config.unix && !config.macos", - "entries": [ - "webengine-system-libdrm", - "webengine-system-xcomposite", - "webengine-system-xcursor", - "webengine-system-xi", - "webengine-system-xrandr", - "webengine-system-xtst" - ] - } - ] - } + "subconfigs": [ + "src/core" ] } diff --git a/examples/webenginewidgets/spellchecker/spellchecker.pro b/examples/webenginewidgets/spellchecker/spellchecker.pro index d41f2c4f7..e1f6c6341 100644 --- a/examples/webenginewidgets/spellchecker/spellchecker.pro +++ b/examples/webenginewidgets/spellchecker/spellchecker.pro @@ -1,4 +1,5 @@ -QT_FOR_CONFIG += webengine +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093 +QT_FOR_CONFIG += webenginecore TEMPLATE = app TARGET = spellchecker diff --git a/examples/webenginewidgets/webenginewidgets.pro b/examples/webenginewidgets/webenginewidgets.pro index ed8fa2561..6b0e6df42 100644 --- a/examples/webenginewidgets/webenginewidgets.pro +++ b/examples/webenginewidgets/webenginewidgets.pro @@ -1,4 +1,5 @@ -QT_FOR_CONFIG += webengine +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093 +QT_FOR_CONFIG += webenginecore TEMPLATE=subdirs diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index f8c154655..21c2f8c01 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -27,8 +27,8 @@ defineTest(runConfigure) { return(false) } - include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) - QT_FOR_CONFIG += webengine-private + include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) + QT_FOR_CONFIG += webenginecore-private !qtConfig(webengine-v8-snapshot-support):qtConfig(webengine-v8-snapshot) { skipBuild("V8 snapshot cannot be built. Most likely, the 32-bit host compiler does not work."\ diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf index 2c8ef43a5..33b71b231 100644 --- a/mkspecs/features/platform.prf +++ b/mkspecs/features/platform.prf @@ -1,5 +1,5 @@ -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += webengine-private +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +QT_FOR_CONFIG += webenginecore-private defineTest(isQtMinimum) { !equals(QT_MAJOR_VERSION, $$1): return(false) diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro index f66f4bd68..d8f57aee1 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro @@ -3,8 +3,8 @@ option(host_build) !debug_and_release: CONFIG += release -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += webengine webengine-private +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +QT_FOR_CONFIG += webenginecore-private build_pass|!debug_and_release { !qtConfig(webengine-system-gn): CONFIG(release, debug|release) { diff --git a/src/buildtools/ninja.pro b/src/buildtools/ninja.pro index 1b15bcb6b..6382d6cfb 100644 --- a/src/buildtools/ninja.pro +++ b/src/buildtools/ninja.pro @@ -2,9 +2,8 @@ TEMPLATE = aux !debug_and_release: CONFIG += release -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += webengine-private - +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +QT_FOR_CONFIG += webenginecore-private build_pass|!debug_and_release { !qtConfig(webengine-system-ninja): CONFIG(release, debug|release) { diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro index 727d82b8a..bda6bf51c 100644 --- a/src/core/api/core_api.pro +++ b/src/core/api/core_api.pro @@ -4,8 +4,7 @@ DESTDIR = $$OUT_PWD/$$getConfigDir() TEMPLATE = lib CONFIG += staticlib c++14 -QT += network core-private -QT_PRIVATE += webenginecoreheaders-private +QT += network core-private webenginecoreheaders-private # Don't create .prl file for this intermediate library because # their contents get used when linking against them, breaking diff --git a/src/core/api/qtwebenginecoreglobal.h b/src/core/api/qtwebenginecoreglobal.h index 012c5d4f0..27bb4255a 100644 --- a/src/core/api/qtwebenginecoreglobal.h +++ b/src/core/api/qtwebenginecoreglobal.h @@ -41,6 +41,7 @@ #define QTWEBENGINECOREGLOBAL_H #include <QtCore/qglobal.h> +#include <QtWebEngineCore/qtwebenginecore-config.h> QT_BEGIN_NAMESPACE diff --git a/src/core/api/qtwebenginecoreglobal_p.h b/src/core/api/qtwebenginecoreglobal_p.h index 0a6ae3f91..d7625a24a 100644 --- a/src/core/api/qtwebenginecoreglobal_p.h +++ b/src/core/api/qtwebenginecoreglobal_p.h @@ -51,7 +51,9 @@ // We mean it. // -#include "qtwebenginecoreglobal.h" +#include <QtWebEngineCore/qtwebenginecoreglobal.h> +#include <QtCore/private/qglobal_p.h> +#include <QtWebEngineCore/private/qtwebenginecore-config_p.h> #ifdef QT_WEBENGINE_LOGGING #define QT_NOT_YET_IMPLEMENTED fprintf(stderr, "function %s not implemented! - %s:%d\n", __func__, __FILE__, __LINE__); diff --git a/src/core/config/common.pri b/src/core/config/common.pri index 3441d9623..0acae8ed0 100644 --- a/src/core/config/common.pri +++ b/src/core/config/common.pri @@ -1,4 +1,6 @@ # Shared configuration for all our supported platforms +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +QT_FOR_CONFIG += webenginecore gn_args += \ use_qt=true \ diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri index 68d64fd4f..bfeec4d2b 100644 --- a/src/core/config/linux.pri +++ b/src/core/config/linux.pri @@ -1,6 +1,5 @@ include(common.pri) -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += gui-private webengine-private +QT_FOR_CONFIG += gui-private webenginecore-private gn_args += \ use_cups=false \ diff --git a/src/core/configure.json b/src/core/configure.json new file mode 100644 index 000000000..518ec982f --- /dev/null +++ b/src/core/configure.json @@ -0,0 +1,722 @@ +{ + "module": "webenginecore", + "depends": [ + "core-private", + "gui-private", + "printsupport" + ], + "testDir": "../../config.tests", + "commandline": { + "options": { + "webengine-alsa": "boolean", + "webengine-embedded-build": "boolean", + "webengine-icu": { "type": "enum", "name": "webengine-system-icu", "values": { "system": "yes", "qt": "no" } }, + "webengine-ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } }, + "webengine-opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } }, + "webengine-webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } }, + "webengine-pepper-plugins": "boolean", + "webengine-printing-and-pdf": "boolean", + "webengine-proprietary-codecs": "boolean", + "webengine-pulseaudio": "boolean", + "webengine-spellchecker": "boolean", + "webengine-native-spellchecker": "boolean", + "webengine-webrtc": "boolean", + "webengine-geolocation": "boolean", + "webengine-v8-snapshot": "boolean", + "alsa": { "type": "boolean", "name": "webengine-alsa" }, + "pulseaudio": { "type": "boolean", "name": "webengine-pulseaudio" }, + "ffmpeg": { "type": "enum", "name": "webengine-system-ffmpeg", "values": { "system": "yes", "qt": "no" } }, + "opus": { "type": "enum", "name": "webengine-system-opus", "values": { "system": "yes", "qt": "no" } }, + "webp": { "type": "enum", "name": "webengine-system-libwebp", "values": { "system": "yes", "qt": "no" } }, + "pepper-plugins": { "type": "boolean", "name": "webengine-pepper-plugins" }, + "printing-and-pdf": { "type": "boolean", "name": "webengine-printing-and-pdf" }, + "proprietary-codecs": { "type": "boolean", "name": "webengine-proprietary-codecs" }, + "spellchecker": { "type": "boolean", "name": "webengine-spellchecker" }, + "webrtc": { "type": "boolean", "name": "webengine-webrtc" } + } + }, + + "libraries": { + "webengine-dbus": { + "label": "d-bus", + "sources": [ + { "type": "pkgConfig", "args": "dbus-1" } + ] + }, + "webengine-fontconfig": { + "label": "fontconfig", + "sources": [ + { "type": "pkgConfig", "args": "fontconfig" } + ] + }, + "webengine-libdrm": { + "label": "libdrm", + "sources": [ + { "type": "pkgConfig", "args": "libdrm" } + ] + }, + "webengine-xcomposite": { + "label": "xcomposite", + "sources": [ + { "type": "pkgConfig", "args": "xcomposite" } + ] + }, + "webengine-xcursor": { + "label": "xcursor", + "sources": [ + { "type": "pkgConfig", "args": "xcursor" } + ] + }, + "webengine-xi": { + "label": "xi", + "sources": [ + { "type": "pkgConfig", "args": "xi" } + ] + }, + "webengine-xrandr": { + "label": "xrandr", + "sources": [ + { "type": "pkgConfig", "args": "xrandr" } + ] + }, + "webengine-xtst": { + "label": "xtst", + "sources": [ + { "type": "pkgConfig", "args": "xtst" } + ] + }, + "webengine-harfbuzz": { + "label": "harfbuzz >= 1.4.2", + "sources": [ + { "type": "pkgConfig", "args": "harfbuzz >= 1.4.2" } + ] + }, + "webengine-glib": { + "label": "glib-2.0 >= 2.32.0", + "sources": [ + { "type": "pkgConfig", "args": "glib-2.0 >= 2.32.0" } + ] + }, + "webengine-zlib": { + "label": "zlib", + "sources": [ + { "type": "pkgConfig", "args": "zlib" } + ] + }, + "webengine-minizip": { + "label": "minizip", + "sources": [ + { "type": "pkgConfig", "args": "minizip" } + ] + }, + "webengine-libevent": { + "label": "libevent", + "sources": [ + { "type": "pkgConfig", "args": "libevent" } + ] + }, + "webengine-libxml2": { + "label": "libxml2 and libxslt", + "sources": [ + { "type": "pkgConfig", "args": "libxml-2.0 libxslt" } + ] + }, + "webengine-jsoncpp": { + "label": "jsoncpp", + "sources": [ + { "type": "pkgConfig", "args": "jsoncpp" } + ] + }, + "webengine-protobuf": { + "label": "protobuf", + "sources": [ + { "type": "pkgConfig", "args": "protobuf" } + ] + }, + "pulseaudio": { + "label": "pulseaudio >= 0.9.10", + "sources": [ + { "type": "pkgConfig", "args": "libpulse >= 0.9.10 libpulse-mainloop-glib" } + ] + }, + "webengine-icu": { + "label": "icu >= 53", + "sources": [ + { "type": "pkgConfig", "args": "icu-uc >= 53 icu-i18n >= 53" } + ] + }, + "webengine-ffmpeg": { + "label": "libavcodec libavformat libavutil", + "sources": [ + { "type": "pkgConfig", "args": "libavcodec libavformat libavutil" } + ] + }, + "webengine-opus": { + "label": "opus", + "sources": [ + { "type": "pkgConfig", "args": "opus" } + ] + }, + "webengine-webp": { + "label": "libwebp, libwebpmux and libwebpdemux", + "sources": [ + { "type": "pkgConfig", "args": "libwebp libwebpmux libwebpdemux" } + ] + }, + "webengine-nss": { + "label": "nss", + "sources": [ + { "type": "pkgConfig", "args": "nss" } + ] + }, + "webengine-png": { + "label": "libpng >= 1.6.0", + "sources": [ + { "type": "pkgConfig", "args": "libpng >= 1.6.0" } + ] + }, + "webengine-jpeglib": { + "label": "compatible jpeglib", + "type": "compile", + "test": { + "head": [ + "#include <cstdio>", + "#include <cstring>", + "extern \"C\" {", + " #include <jpeglib.h>", + "}" + ], + "main": [ + "JDIMENSION dummy;", + "jpeg_crop_scanline(nullptr, &dummy, &dummy);", + "jpeg_skip_scanlines(nullptr, dummy);" + ] + }, + "sources": [ + { "type": "pkgConfig", "args": "libjpeg" }, + "-ljpeg" + ] + }, + "webengine-lcms2": { + "label": "lcms2", + "sources": [ + { "type": "pkgConfig", "args": "lcms2" } + ] + } + }, + + "tests" : { + "webengine-alsa": { + "label": "alsa", + "test": "alsa", + "type": "compile" + }, + "webengine-host-compiler": { + "label": "host compiler", + "test": "hostcompiler", + "host": "true", + "type": "compile" + }, + "webengine-khr": { + "label": "khr", + "test": "khr", + "type": "compile" + }, + "webengine-libvpx": { + "label": "libvpx", + "test": "libvpx", + "type": "compile" + }, + "webengine-snappy": { + "label": "snappy", + "test": "snappy", + "type": "compile" + }, + "webengine-srtp": { + "label": "srtp", + "test": "srtp", + "type": "compile" + }, + "webengine-winversion": { + "label": "winversion", + "test": "winversion", + "type": "compile" + }, + "webengine-protoc": { + "label": "protoc", + "type": "detectProtoc" + }, + "webengine-python2": { + "label": "python2", + "type": "detectPython2", + "log": "location" + }, + "webengine-host-pkg-config": { + "label": "host pkg-config", + "type": "detectHostPkgConfig", + "log": "path" + }, + "webengine-gperf": { + "label": "gperf", + "type": "detectGperf" + }, + "webengine-bison": { + "label": "bison", + "type": "detectBison" + }, + "webengine-flex": { + "label": "flex", + "type": "detectFlex" + }, + "webengine-ninja": { + "label": "system ninja", + "type": "detectNinja" + }, + "webengine-gn": { + "label": "system gn", + "type": "detectGn" + }, + "webengine-embedded-build": { + "label": "embedded", + "type": "embedded" + }, + "webengine-re2": { + "label": "re2", + "test": "re2", + "type": "compile" + }, + "webengine-glibc": { + "label": "glibc > 2.16", + "type": "detectGlibc" + }, + "webengine-libxml2-compatible": { + "label" : "compatible system libxml2", + "test" : "xml2", + "type": "compile" + }, + "webengine-sanitizer": { + "label" : "sanitizer support", + "type": "isSanitizerSupported" + } + }, + + "features": { + "webengine-system-fontconfig": { + "label": "fontconfig", + "condition": "libs.webengine-fontconfig", + "output": [ "privateFeature" ] + }, + "webengine-system-dbus": { + "label": "dbus", + "condition": "libs.webengine-dbus", + "output": [ "privateFeature" ] + }, + "webengine-system-libdrm": { + "label": "libdrm", + "condition": "libs.webengine-libdrm", + "output": [ "privateFeature" ] + }, + "webengine-system-xcomposite": { + "label": "xcomposite", + "condition": "libs.webengine-xcomposite", + "output": [ "privateFeature" ] + }, + "webengine-system-xcursor": { + "label": "xcursor", + "condition": "libs.webengine-xcursor", + "output": [ "privateFeature" ] + }, + "webengine-system-xi": { + "label": "xi", + "condition": "libs.webengine-xi", + "output": [ "privateFeature" ] + }, + "webengine-system-xrandr": { + "label": "xrandr", + "condition": "libs.webengine-xrandr", + "output": [ "privateFeature" ] + }, + "webengine-system-xtst": { + "label": "xtst", + "condition": "libs.webengine-xtst", + "output": [ "privateFeature" ] + }, + "webengine-system-harfbuzz": { + "label": "harfbuzz", + "condition": "config.unix && features.system-harfbuzz && libs.webengine-harfbuzz", + "output": [ "privateFeature" ] + }, + "webengine-system-glib" : { + "label": "glib", + "condition": "config.unix && libs.webengine-glib", + "output": [ "privateFeature" ] + }, + "webengine-system-minizip" : { + "label": "minizip", + "condition": "config.unix && libs.webengine-minizip", + "output": [ "privateFeature" ] + }, + "webengine-system-zlib" : { + "label": "zlib", + "condition": "config.unix && features.system-zlib && libs.webengine-zlib", + "output": [ "privateFeature" ] + }, + "webengine-system-libevent" : { + "label": "libevent", + "condition": "config.unix && libs.webengine-libevent", + "output": [ "privateFeature" ] + }, + "webengine-system-jsoncpp" : { + "label": "jsoncpp", + "condition": "config.unix && libs.webengine-jsoncpp", + "output": [ "privateFeature" ] + }, + "webengine-system-protobuf" : { + "label": "protobuf", + "condition": "config.unix && libs.webengine-protobuf && tests.webengine-protoc", + "output": [ "privateFeature" ] + }, + "webengine-system-png" : { + "label": "png", + "condition": "config.unix && features.system-png && libs.webengine-png", + "output": [ "privateFeature" ] + }, + "webengine-system-jpeg" : { + "label": "JPEG", + "condition": "config.unix && features.system-jpeg && libs.webengine-jpeglib", + "output": [ "privateFeature" ] + }, + "webengine-python2": { + "label": "python2", + "condition": "tests.webengine-python2", + "output": [ + "privateFeature", + { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" } + ] + }, + "webengine-host-pkg-config": { + "label": "host-pkg-config", + "condition": "config.unix && tests.webengine-host-pkg-config", + "output": [ + "privateFeature", + { "type": "varAssign", "name": "QMAKE_PKG_CONFIG_HOST", "value": "tests.webengine-host-pkg-config.path" } + ] + }, + "webengine-gperf": { + "label": "gperf", + "condition": "tests.webengine-gperf", + "output": [ "privateFeature" ] + }, + "webengine-bison": { + "label": "bison", + "condition": "tests.webengine-bison", + "output": [ "privateFeature" ] + }, + "webengine-flex": { + "label": "flex", + "condition": "tests.webengine-flex", + "output": [ "privateFeature" ] + }, + "webengine-embedded-build": { + "label": "Embedded build", + "purpose": "Enables the embedded build configuration.", + "section": "WebEngine", + "condition": "config.unix", + "autoDetect": "tests.webengine-embedded-build", + "output": [ "privateFeature" ] + }, + "webengine-alsa": { + "label": "Use ALSA", + "condition": "config.unix && tests.webengine-alsa", + "output": [ "privateFeature" ] + }, + "webengine-v8-snapshot": { + "label" : "Use v8 snapshot", + "purpose": "Enables the v8 snapshot, for fast v8 context creation", + "output": [ "privateFeature" ] + }, + "webengine-v8-snapshot-support": { + "label" : "Building v8 snapshot supported", + "autoDetect": "features.webengine-v8-snapshot", + "condition": "!config.unix || !features.cross_compile || arch.arm64 || tests.webengine-host-compiler", + "output": [ "privateFeature" ] + }, + "webengine-system-khr" : { + "label": "khr", + "condition": "config.unix && tests.webengine-khr", + "output": [ "privateFeature" ] + }, + "webengine-system-libvpx" : { + "label": "libvpx", + "condition": "config.unix && tests.webengine-libvpx", + "output": [ "privateFeature" ] + }, + "webengine-system-snappy" : { + "label": "snappy", + "condition": "config.unix && tests.webengine-snappy", + "output": [ "privateFeature" ] + }, + "webengine-system-libsrtp" : { + "label": "libsrtp", + "condition": "config.unix && tests.webengine-srtp", + "output": [ "privateFeature" ] + }, + "webengine-winversion" : { + "label": "winversion", + "condition": "config.win32 && tests.webengine-winversion", + "output": [ "privateFeature" ] + }, + "webengine-geolocation": { + "label": "Geolocation", + "condition": "module.positioning", + "output": [ "privateFeature" ] + }, + "webengine-pulseaudio": { + "label": "Use PulseAudio", + "autoDetect": "config.unix", + "condition": "libs.pulseaudio", + "output": [ "privateFeature" ] + }, + "webengine-pepper-plugins": { + "label": "Pepper Plugins", + "purpose": "Enables use of Pepper Flash and Widevine plugins.", + "section": "WebEngine", + "autoDetect": "!features.webengine-embedded-build", + "output": [ "privateFeature" ] + }, + "webengine-printing-and-pdf": { + "label": "Printing and PDF", + "purpose": "Provides printing and output to PDF.", + "section": "WebEngine", + "condition": "module.printsupport && features.printer", + "autoDetect": "!features.webengine-embedded-build", + "output": [ "privateFeature" ] + }, + "webengine-proprietary-codecs": { + "label": "Proprietary Codecs", + "purpose": "Enables the use of proprietary codecs such as h.264/h.265 and MP3.", + "section": "WebEngine", + "autoDetect": false, + "output": [ "privateFeature" ] + }, + "webengine-spellchecker": { + "label": "Spellchecker", + "purpose": "Provides a spellchecker.", + "section": "WebEngine", + "output": [ "publicFeature" ] + }, + "webengine-native-spellchecker": { + "label": "Native Spellchecker", + "purpose": "Use the system's native spellchecking engine.", + "section": "WebEngine", + "autoDetect": false, + "condition": "config.macos && features.webengine-spellchecker", + "output": [ "publicFeature" ] + }, + "webengine-ui-delegates": { + "label": "UI Delegates", + "output": [ "privateFeature" ] + }, + "webengine-testsupport": { + "label": "Test Support", + "autoDetect": "features.private_tests || call.isTestsInBuildParts", + "output": [ "privateFeature" ] + }, + "webengine-webrtc": { + "label": "WebRTC", + "purpose": "Provides WebRTC support.", + "section": "WebEngine", + "autoDetect": "!features.webengine-embedded-build", + "output": [ "privateFeature" ] + }, + "webengine-system-nss": { + "label": "nss", + "condition": "config.unix && !config.darwin && libs.webengine-nss", + "output": [ "privateFeature" ] + }, + "webengine-system-libwebp": { + "label": "libwebp, libwebpmux and libwebpdemux", + "autoDetect": "config.unix", + "condition": "libs.webengine-webp", + "output": [ "privateFeature" ] + }, + "webengine-system-opus": { + "label": "opus", + "autoDetect": "config.unix", + "condition": "libs.webengine-opus", + "output": [ "privateFeature" ] + }, + "webengine-system-ffmpeg": { + "label": "ffmpeg", + "autoDetect": false, + "condition": "libs.webengine-ffmpeg && features.webengine-system-opus && features.webengine-system-libwebp", + "output": [ "privateFeature" ] + }, + "webengine-system-icu": { + "label": "icu", + "autoDetect": false, + "condition": "libs.webengine-icu", + "output": [ "privateFeature" ] + }, + "webengine-system-re2": { + "label": "re2", + "autoDetect": "config.unix", + "condition": "tests.webengine-re2", + "output": [ "privateFeature" ] + }, + "webengine-system-ninja": { + "label": "Use System Ninja", + "condition": "tests.webengine-ninja", + "output": [ "privateFeature" ] + }, + "webengine-system-gn": { + "label": "Use System Gn", + "autoDetect": false, + "condition": "tests.webengine-gn", + "output": [ "privateFeature" ] + }, + "webengine-system-glibc": { + "label": "glibc", + "condition": "config.linux && tests.webengine-glibc", + "output": [ "privateFeature" ] + }, + "webengine-system-libxml2": { + "label": "libxml2 and libxslt", + "condition": "config.unix + && libs.webengine-libxml2 + && tests.webengine-libxml2-compatible", + "output": [ "privateFeature" ] + }, + "webengine-system-lcms2" : { + "label": "lcms2", + "autoDetect": "features.webengine-printing-and-pdf", + "condition": "config.unix && libs.webengine-lcms2", + "output": [ "privateFeature" ] + }, + "webengine-sanitizer" : { + "label": "Sanitizer", + "autoDetect": "config.sanitizer && tests.webengine-sanitizer", + "condition": "config.sanitizer", + "output": [ "privateFeature" ] + } + }, + + "report": [ + { + "type": "warning", + "condition": "!features.webengine-python2", + "message": "Python version 2 (2.7.5 or later) is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "!features.webengine-gperf", + "message": "gperf is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "!features.webengine-bison", + "message": "bison is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "!features.webengine-flex", + "message": "flex is required to build QtWebEngine." + }, + { + "type": "warning", + "condition": "config.sanitizer && !tests.webengine-sanitizer && !features.webengine-sanitizer", + "message": "Qt WebEngine cannot be built with the chosen sanitizer configuration. Check config.log for details or use -feature-webengine-sanitizer to force the build." + }, + { + "type": "warning", + "condition": "config.unix && !features.webengine-host-pkg-config", + "message": "host pkg-config not found" + } + ], + + "summary": [ + { + "section": "Qt WebEngine", + "entries": [ + "webengine-embedded-build", + "webengine-pepper-plugins", + "webengine-printing-and-pdf", + "webengine-proprietary-codecs", + "webengine-spellchecker", + "webengine-native-spellchecker", + "webengine-webrtc", + "webengine-system-ninja", + "webengine-geolocation", + "webengine-v8-snapshot", + { + "type": "feature", + "args": "webengine-v8-snapshot-support", + "condition": "config.unix && config.cross_compile && features.webengine-v8-snapshot" + }, + { + "type": "feature", + "args": "webengine-alsa", + "condition": "config.unix" + }, + { + "type": "feature", + "args": "webengine-pulseaudio", + "condition": "config.unix" + }, + { + "type": "feature", + "args": "webengine-sanitizer", + "condition": "config.sanitizer" + }, + { + "section": "Optional system libraries used", + "condition": "config.unix", + "entries": [ + "webengine-system-re2", + "webengine-system-icu", + "webengine-system-libwebp", + "webengine-system-opus", + "webengine-system-ffmpeg", + "webengine-system-libvpx", + "webengine-system-snappy", + "webengine-system-libsrtp", + "webengine-system-glib", + "webengine-system-zlib", + "webengine-system-minizip", + "webengine-system-libevent", + "webengine-system-jsoncpp", + "webengine-system-protobuf", + "webengine-system-libxml2", + "webengine-system-lcms2", + "webengine-system-png", + "webengine-system-jpeg", + "webengine-system-harfbuzz" + ] + }, + { + "section": "Required system libraries", + "condition": "config.unix && !config.macos", + "entries": [ + "webengine-system-fontconfig", + "webengine-system-dbus", + "webengine-system-nss", + "webengine-system-khr", + "webengine-system-glibc" + ] + }, + { + "section": "Required system libraries for qpa-xcb", + "condition": "config.unix && !config.macos", + "entries": [ + "webengine-system-libdrm", + "webengine-system-xcomposite", + "webengine-system-xcursor", + "webengine-system-xi", + "webengine-system-xrandr", + "webengine-system-xtst" + ] + } + ] + } + ] +} diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri index 94d3e9624..12cccc045 100644 --- a/src/core/core_chromium.pri +++ b/src/core/core_chromium.pri @@ -1,3 +1,6 @@ +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +QT_FOR_CONFIG += webenginecore-private + qtConfig(debug_and_release): CONFIG += debug_and_release include(core_common.pri) diff --git a/src/core/core_generator.pro b/src/core/core_generator.pro index cbf126dda..916c211f9 100644 --- a/src/core/core_generator.pro +++ b/src/core/core_generator.pro @@ -1,6 +1,3 @@ -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += webengine-private - include(core_gn_config.pri) TEMPLATE = lib diff --git a/src/core/core_headers.pro b/src/core/core_headers.pro index 52c6ca57d..21b5d58c3 100644 --- a/src/core/core_headers.pro +++ b/src/core/core_headers.pro @@ -1,5 +1,5 @@ TARGET = QtWebEngineCore CONFIG += no_private_module header_module internal_module no_plist MODULE = webenginecoreheaders - +MODULE_CFG_FILE = qtwebenginecore-config load(qt_module) diff --git a/src/core/core_module.pro b/src/core/core_module.pro index d21985e60..3b5d37f29 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -1,6 +1,3 @@ -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += webengine-private - MODULE = webenginecore include(core_common.pri) diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro index c8c503a39..9860c4541 100644 --- a/src/core/gn_run.pro +++ b/src/core/gn_run.pro @@ -1,5 +1,5 @@ -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += webengine webengine-private +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +QT_FOR_CONFIG += webenginecore-private TEMPLATE = aux diff --git a/src/core/printing/pdfium_document_wrapper_qt.cpp b/src/core/printing/pdfium_document_wrapper_qt.cpp index a7433b2cc..681030eed 100644 --- a/src/core/printing/pdfium_document_wrapper_qt.cpp +++ b/src/core/printing/pdfium_document_wrapper_qt.cpp @@ -36,11 +36,8 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#include "pdf/features.h" -#if BUILDFLAG(ENABLE_PDF) #include "pdfium_document_wrapper_qt.h" - #include <QtCore/qhash.h> #include <QtGui/qimage.h> #include <QtGui/qpainter.h> @@ -165,4 +162,3 @@ PdfiumDocumentWrapperQt::~PdfiumDocumentWrapperQt() } } -#endif // BUILDFLAG(ENABLE_PDF) diff --git a/src/core/web_contents_view_qt.h b/src/core/web_contents_view_qt.h index 1e4b27535..17058e05c 100644 --- a/src/core/web_contents_view_qt.h +++ b/src/core/web_contents_view_qt.h @@ -45,8 +45,6 @@ #include "content/browser/web_contents/web_contents_view.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_widget_host.h" - -#include "qtwebenginecoreglobal_p.h" #include "render_widget_host_view_qt.h" #include "web_contents_adapter_client.h" #include "web_contents_delegate_qt.h" diff --git a/src/src.pro b/src/src.pro index d675f1f13..218cdb66d 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,5 +1,5 @@ -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += webengine webengine-private +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +QT_FOR_CONFIG += webenginecore webenginecore-private TEMPLATE = subdirs diff --git a/src/webengine/api/qquickwebenginecontextmenurequest_p.h b/src/webengine/api/qquickwebenginecontextmenurequest_p.h index 245955788..bc50eccb8 100644 --- a/src/webengine/api/qquickwebenginecontextmenurequest_p.h +++ b/src/webengine/api/qquickwebenginecontextmenurequest_p.h @@ -50,7 +50,7 @@ // // We mean it. -#include <private/qtwebengineglobal_p.h> +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include <QtCore/QScopedPointer> #include <QtCore/QObject> #include <QtCore/QUrl> diff --git a/src/webengine/api/qquickwebenginedialogrequests_p.h b/src/webengine/api/qquickwebenginedialogrequests_p.h index d8a0e004c..cdb10c26b 100644 --- a/src/webengine/api/qquickwebenginedialogrequests_p.h +++ b/src/webengine/api/qquickwebenginedialogrequests_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qtwebengineglobal_p.h> +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include <QtCore/QUrl> #include <QtCore/QWeakPointer> #include <QtCore/QRect> diff --git a/src/webengine/api/qquickwebenginedownloaditem_p.h b/src/webengine/api/qquickwebenginedownloaditem_p.h index 1699ee9dc..88be0dbd1 100644 --- a/src/webengine/api/qquickwebenginedownloaditem_p.h +++ b/src/webengine/api/qquickwebenginedownloaditem_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qtwebengineglobal_p.h> +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include <QObject> #include <QScopedPointer> #include <QString> diff --git a/src/webengine/api/qquickwebenginedownloaditem_p_p.h b/src/webengine/api/qquickwebenginedownloaditem_p_p.h index 6b4f7c8d3..b36494d17 100644 --- a/src/webengine/api/qquickwebenginedownloaditem_p_p.h +++ b/src/webengine/api/qquickwebenginedownloaditem_p_p.h @@ -54,7 +54,6 @@ #include "browser_context_adapter_client.h" #include "qquickwebenginedownloaditem_p.h" #include "qquickwebengineprofile.h" -#include <private/qtwebengineglobal_p.h> #include <QString> #include <QPointer> diff --git a/src/webengine/api/qquickwebenginefaviconprovider_p_p.h b/src/webengine/api/qquickwebenginefaviconprovider_p_p.h index 52f3fb7a9..18b6d61c8 100644 --- a/src/webengine/api/qquickwebenginefaviconprovider_p_p.h +++ b/src/webengine/api/qquickwebenginefaviconprovider_p_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qtwebengineglobal_p.h> +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include <QtQuick/QQuickImageProvider> #include <QtCore/QMap> diff --git a/src/webengine/api/qquickwebenginehistory_p.h b/src/webengine/api/qquickwebenginehistory_p.h index 22340e483..bf049b2a6 100644 --- a/src/webengine/api/qquickwebenginehistory_p.h +++ b/src/webengine/api/qquickwebenginehistory_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <qtwebengineglobal.h> +#include <QtWebEngine/qtwebengineglobal.h> #include <QAbstractListModel> #include <QtCore/qshareddata.h> #include <QQuickItem> diff --git a/src/webengine/api/qquickwebengineloadrequest_p.h b/src/webengine/api/qquickwebengineloadrequest_p.h index aa4bc906c..6d8dd8061 100644 --- a/src/webengine/api/qquickwebengineloadrequest_p.h +++ b/src/webengine/api/qquickwebengineloadrequest_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include "qtwebengineglobal_p.h" +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include "qquickwebengineview_p.h" QT_BEGIN_NAMESPACE diff --git a/src/webengine/api/qquickwebenginenavigationrequest_p.h b/src/webengine/api/qquickwebenginenavigationrequest_p.h index 852cd03c4..55e3ca673 100644 --- a/src/webengine/api/qquickwebenginenavigationrequest_p.h +++ b/src/webengine/api/qquickwebenginenavigationrequest_p.h @@ -51,7 +51,6 @@ // We mean it. // -#include "qtwebengineglobal_p.h" #include "qquickwebengineview_p.h" #include <QtCore/QObject> diff --git a/src/webengine/api/qquickwebenginenewviewrequest_p.h b/src/webengine/api/qquickwebenginenewviewrequest_p.h index 9cc0f291f..e21f76111 100644 --- a/src/webengine/api/qquickwebenginenewviewrequest_p.h +++ b/src/webengine/api/qquickwebenginenewviewrequest_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include "qtwebengineglobal_p.h" +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include "qquickwebengineview_p.h" namespace QtWebEngineCore { diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index 6c7985e3f..d8db796de 100644 --- a/src/webengine/api/qquickwebengineprofile.cpp +++ b/src/webengine/api/qquickwebengineprofile.cpp @@ -50,7 +50,6 @@ #include <QQmlEngine> #include "browser_context_adapter.h" -#include <qtwebenginecoreglobal.h> #include "renderer_host/user_resource_controller_host.h" #include "web_engine_settings.h" diff --git a/src/webengine/api/qquickwebenginesettings_p.h b/src/webengine/api/qquickwebenginesettings_p.h index 267767941..ca583379d 100644 --- a/src/webengine/api/qquickwebenginesettings_p.h +++ b/src/webengine/api/qquickwebenginesettings_p.h @@ -51,7 +51,7 @@ // We mean it. // -#include <private/qtwebengineglobal_p.h> +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include <QObject> #include <QScopedPointer> diff --git a/src/webengine/api/qquickwebenginesingleton_p.h b/src/webengine/api/qquickwebenginesingleton_p.h index c7d946a37..ba63382e5 100644 --- a/src/webengine/api/qquickwebenginesingleton_p.h +++ b/src/webengine/api/qquickwebenginesingleton_p.h @@ -51,8 +51,8 @@ // We mean it. // +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include <QObject> -#include "qtwebengineglobal_p.h" QT_BEGIN_NAMESPACE class QQuickWebEngineProfile; diff --git a/src/webengine/api/qquickwebenginetestsupport_p.h b/src/webengine/api/qquickwebenginetestsupport_p.h index b601fb47c..30e6ee5c4 100644 --- a/src/webengine/api/qquickwebenginetestsupport_p.h +++ b/src/webengine/api/qquickwebenginetestsupport_p.h @@ -51,8 +51,8 @@ // We mean it. // -#include <private/qinputmethod_p.h> -#include <private/qtwebengineglobal_p.h> +#include <QtGui/private/qinputmethod_p.h> +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include <QEvent> #include <QObject> diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index ba7377c2c..8d5d843bf 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -39,7 +39,7 @@ #include "qquickwebengineview_p.h" #include "qquickwebengineview_p_p.h" - +#include "qtwebenginecoreglobal_p.h" #include "authentication_dialog_controller.h" #include "browser_context_adapter.h" #include "certificate_error_controller.h" @@ -59,7 +59,7 @@ #include "qwebenginequotarequest.h" #include "qwebengineregisterprotocolhandlerrequest.h" -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) #include "qquickwebenginetestsupport_p.h" #endif @@ -87,8 +87,8 @@ #include <QScreen> #include <QUrl> #include <QTimer> -#include <private/qguiapplication_p.h> -#include <qpa/qplatformintegration.h> +#include <QtGui/private/qguiapplication_p.h> +#include <QtGui/qpa/qplatformintegration.h> QT_BEGIN_NAMESPACE using namespace QtWebEngineCore; @@ -107,7 +107,7 @@ QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate() , adapter(QSharedPointer<WebContentsAdapter>::create()) , m_history(new QQuickWebEngineHistory(this)) , m_settings(new QQuickWebEngineSettings(m_profile->settings())) -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) , m_testSupport(0) #endif , contextMenuExtraItems(0) @@ -384,7 +384,7 @@ void QQuickWebEngineViewPrivate::loadStarted(const QUrl &provisionalUrl, bool is { Q_Q(QQuickWebEngineView); if (isErrorPage) { -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) if (m_testSupport) m_testSupport->errorPage()->loadStarted(provisionalUrl); #endif @@ -409,7 +409,7 @@ void QQuickWebEngineViewPrivate::loadCommitted() void QQuickWebEngineViewPrivate::loadVisuallyCommitted() { -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) if (m_testSupport) Q_EMIT m_testSupport->loadVisuallyCommitted(); #endif @@ -424,7 +424,7 @@ void QQuickWebEngineViewPrivate::loadFinished(bool success, const QUrl &url, boo Q_Q(QQuickWebEngineView); if (isErrorPage) { -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) if (m_testSupport) m_testSupport->errorPage()->loadFinished(success, url); #endif @@ -517,7 +517,7 @@ void QQuickWebEngineViewPrivate::close() void QQuickWebEngineViewPrivate::windowCloseRejected() { -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) if (m_testSupport) Q_EMIT m_testSupport->windowCloseRejected(); #endif @@ -930,7 +930,7 @@ void QQuickWebEngineViewPrivate::setProfile(QQuickWebEngineProfile *profile) } } -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) QQuickWebEngineTestSupport *QQuickWebEngineView::testSupport() const { Q_D(const QQuickWebEngineView); @@ -1141,7 +1141,7 @@ bool QQuickWebEngineView::recentlyAudible() const void QQuickWebEngineView::printToPdf(const QString& filePath, PrintedPageSizeId pageSizeId, PrintedPageOrientation orientation) { -#if defined(ENABLE_PDF) +#if QT_CONFIG(webengine_printing_and_pdf) Q_D(QQuickWebEngineView); QPageSize layoutSize(static_cast<QPageSize::PageSizeId>(pageSizeId)); QPageLayout::Orientation layoutOrientation = static_cast<QPageLayout::Orientation>(orientation); @@ -1157,7 +1157,7 @@ void QQuickWebEngineView::printToPdf(const QString& filePath, PrintedPageSizeId void QQuickWebEngineView::printToPdf(const QJSValue &callback, PrintedPageSizeId pageSizeId, PrintedPageOrientation orientation) { -#if defined(ENABLE_PDF) +#if QT_CONFIG(webengine_printing_and_pdf) Q_D(QQuickWebEngineView); QPageSize layoutSize(static_cast<QPageSize::PageSizeId>(pageSizeId)); QPageLayout::Orientation layoutOrientation = static_cast<QPageLayout::Orientation>(orientation); diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h index 8d20740e6..0ca0c7886 100644 --- a/src/webengine/api/qquickwebengineview_p.h +++ b/src/webengine/api/qquickwebengineview_p.h @@ -51,7 +51,8 @@ // We mean it. // -#include <private/qtwebengineglobal_p.h> +#include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h> +#include <QtWebEngine/private/qtwebengineglobal_p.h> #include "qquickwebenginescript.h" #include <QQuickItem> #include <QtGui/qcolor.h> @@ -79,7 +80,7 @@ class QQuickWebEngineViewPrivate; class QWebEngineQuotaRequest; class QWebEngineRegisterProtocolHandlerRequest; -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) class QQuickWebEngineTestSupport; #endif @@ -130,7 +131,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem { Q_PROPERTY(QQuickWebEngineView *inspectedView READ inspectedView WRITE setInspectedView NOTIFY inspectedViewChanged REVISION 7 FINAL) Q_PROPERTY(QQuickWebEngineView *devToolsView READ devToolsView WRITE setDevToolsView NOTIFY devToolsViewChanged REVISION 7 FINAL) -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) Q_PROPERTY(QQuickWebEngineTestSupport *testSupport READ testSupport WRITE setTestSupport NOTIFY testSupportChanged FINAL) #endif @@ -474,7 +475,7 @@ public: void setAudioMuted(bool muted); bool recentlyAudible() const; -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) QQuickWebEngineTestSupport *testSupport() const; void setTestSupport(QQuickWebEngineTestSupport *testSupport); #endif @@ -547,7 +548,7 @@ Q_SIGNALS: Q_REVISION(7) void devToolsViewChanged(); Q_REVISION(7) void registerProtocolHandlerRequested(const QWebEngineRegisterProtocolHandlerRequest &request); -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) void testSupportChanged(); #endif diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h index 5b52919b6..7a196bd70 100644 --- a/src/webengine/api/qquickwebengineview_p_p.h +++ b/src/webengine/api/qquickwebengineview_p_p.h @@ -78,7 +78,7 @@ class QQuickWebEngineProfilePrivate; QQuickWebEngineView::WebAction editorActionForKeyEvent(QKeyEvent* event); -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) class QQuickWebEngineTestSupport; #endif @@ -169,7 +169,7 @@ public: QSharedPointer<QtWebEngineCore::WebContentsAdapter> adapter; QScopedPointer<QQuickWebEngineHistory> m_history; QScopedPointer<QQuickWebEngineSettings> m_settings; -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) QQuickWebEngineTestSupport *m_testSupport; #endif QQmlComponent *contextMenuExtraItems; diff --git a/src/webengine/plugin/plugin.pro b/src/webengine/plugin/plugin.pro index 84b497e34..0bbe83c26 100644 --- a/src/webengine/plugin/plugin.pro +++ b/src/webengine/plugin/plugin.pro @@ -4,7 +4,7 @@ TARGETPATH = QtWebEngine IMPORT_VERSION = 1.7 QT += webengine qml quick -QT_PRIVATE += webengine-private +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 diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp index 080a37eeb..3d539f8b2 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -47,7 +47,7 @@ #include <QSurfaceFormat> #include <QVariant> #include <QWindow> -#include <private/qquickwindow_p.h> +#include <QtQuick/private/qquickwindow_p.h> namespace QtWebEngineCore { diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro index 570f41866..7b2818a06 100644 --- a/src/webengine/webengine.pro +++ b/src/webengine/webengine.pro @@ -1,5 +1,5 @@ -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += webengine webengine-private +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093 +QT_FOR_CONFIG += webenginecore-private TARGET = QtWebEngine @@ -7,7 +7,7 @@ TARGET = QtWebEngine DEFINES += QT_BUILD_WEBENGINE_LIB QT += qml quick webenginecore -QT_PRIVATE += quick-private gui-private core-private +QT_PRIVATE += quick-private gui-private core-private webenginecore-private QMAKE_DOCS = $$PWD/doc/qtwebengine.qdocconf @@ -60,19 +60,8 @@ HEADERS = \ qtConfig(webengine-testsupport) { QT_PRIVATE += testlib - SOURCES += api/qquickwebenginetestsupport.cpp HEADERS += api/qquickwebenginetestsupport_p.h - - DEFINES += ENABLE_QML_TESTSUPPORT_API -} - -qtConfig(webengine-spellchecker) { - DEFINES += ENABLE_SPELLCHECK -} - -qtConfig(webengine-printing-and-pdf) { - DEFINES += ENABLE_PDF } !build_pass { diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 8badd4f7a..66a84e677 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -47,6 +47,9 @@ #include "favicon_manager.h" #include "file_picker_controller.h" #include "javascript_dialog_controller.h" +#if QT_CONFIG(webengine_printing_and_pdf) +#include "printing/pdfium_document_wrapper_qt.h" +#endif #include "qwebenginefullscreenrequest.h" #include "qwebenginehistory.h" #include "qwebenginehistory_p.h" @@ -78,7 +81,7 @@ #include <QMenu> #include <QMessageBox> #include <QMimeData> -#ifdef ENABLE_PRINTING +#if QT_CONFIG(webengine_printing_and_pdf) #include <QPrinter> #endif #include <QStandardPaths> @@ -86,17 +89,13 @@ #include <QTimer> #include <QUrl> -#if defined(ENABLE_PRINTING) && defined(ENABLE_PDF) -#include "printing/pdfium_document_wrapper_qt.h" -#endif - QT_BEGIN_NAMESPACE using namespace QtWebEngineCore; static const int MaxTooltipLength = 1024; -#if defined(ENABLE_PRINTING) && defined(ENABLE_PDF) +#if QT_CONFIG(webengine_printing_and_pdf) static bool printPdfDataOnPrinter(const QByteArray& data, QPrinter& printer) { if (!data.size()) { @@ -177,7 +176,7 @@ static bool printPdfDataOnPrinter(const QByteArray& data, QPrinter& printer) return true; } -#endif // defined(ENABLE_PRINTING) && defined(ENABLE_PDF) +#endif // QT_CONFIG(webengine_printing_and_pdf) static QWebEnginePage::WebWindowType toWindowType(WebContentsAdapterClient::WindowOpenDisposition disposition) { @@ -231,7 +230,7 @@ QWebEnginePagePrivate::QWebEnginePagePrivate(QWebEngineProfile *_profile) , webChannelWorldId(QWebEngineScript::MainWorld) , defaultAudioMuted(false) , defaultZoomFactor(1.0) -#if defined(ENABLE_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) , currentPrinter(nullptr) #endif { @@ -498,8 +497,7 @@ void QWebEnginePagePrivate::didFindText(quint64 requestId, int matchCount) void QWebEnginePagePrivate::didPrintPage(quint64 requestId, const QByteArray &result) { -#if defined(ENABLE_PDF) -#if defined(ENABLE_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) // If no currentPrinter is set that means that were printing to PDF only. if (!currentPrinter) { m_callbacks.invoke(requestId, result); @@ -510,14 +508,11 @@ void QWebEnginePagePrivate::didPrintPage(quint64 requestId, const QByteArray &re m_callbacks.invoke(requestId, printerResult); currentPrinter = nullptr; -#else // If print support is disabled, only PDF printing is available. - m_callbacks.invoke(requestId, result); -#endif // defined(ENABLE_PRINTING) -#else // defined(ENABLE_PDF) +#else // we should never enter this branch, but just for safe-keeping... Q_UNUSED(result); m_callbacks.invoke(requestId, QByteArray()); -#endif // defined(ENABLE_PDF) +#endif } void QWebEnginePagePrivate::passOnFocus(bool reverse) @@ -2211,20 +2206,18 @@ QSizeF QWebEnginePage::contentsSize() const */ void QWebEnginePage::printToPdf(const QString &filePath, const QPageLayout &pageLayout) { -#if defined(ENABLE_PDF) +#if QT_CONFIG(webengine_printing_and_pdf) Q_D(const QWebEnginePage); -#if defined(ENABLE_PRINTING) if (d->currentPrinter) { qWarning("Cannot print to PDF while at the same time printing on printer %ls", qUtf16Printable(d->currentPrinter->printerName())); return; } -#endif // ENABLE_PRINTING d->ensureInitialized(); d->adapter->printToPDF(pageLayout, filePath); #else Q_UNUSED(filePath); Q_UNUSED(pageLayout); -#endif // if defined(ENABLE_PDF) +#endif } @@ -2241,21 +2234,19 @@ void QWebEnginePage::printToPdf(const QString &filePath, const QPageLayout &page void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &resultCallback, const QPageLayout &pageLayout) { Q_D(QWebEnginePage); -#if defined(ENABLE_PDF) -#if defined(ENABLE_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) if (d->currentPrinter) { qWarning("Cannot print to PDF while at the same time printing on printer %ls", qUtf16Printable(d->currentPrinter->printerName())); d->m_callbacks.invokeEmpty(resultCallback); return; } -#endif // ENABLE_PRINTING d->ensureInitialized(); quint64 requestId = d->adapter->printToPDFCallbackResult(pageLayout); d->m_callbacks.registerCallback(requestId, resultCallback); -#else // if defined(ENABLE_PDF) +#else Q_UNUSED(pageLayout); d->m_callbacks.invokeEmpty(resultCallback); -#endif // if defined(ENABLE_PDF) +#endif } /*! @@ -2273,24 +2264,22 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &res void QWebEnginePage::print(QPrinter *printer, const QWebEngineCallback<bool> &resultCallback) { Q_D(QWebEnginePage); -#if defined(ENABLE_PDF) -#if defined(ENABLE_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) if (d->currentPrinter) { qWarning("Cannot print page on printer %ls: Already printing on %ls.", qUtf16Printable(printer->printerName()), qUtf16Printable(d->currentPrinter->printerName())); d->m_callbacks.invokeDirectly(resultCallback, false); return; } d->currentPrinter = printer; -#endif // ENABLE_PRINTING d->ensureInitialized(); quint64 requestId = d->adapter->printToPDFCallbackResult(printer->pageLayout(), printer->colorMode() == QPrinter::Color, false); d->m_callbacks.registerCallback(requestId, resultCallback); -#else // if defined(ENABLE_PDF) +#else Q_UNUSED(printer); d->m_callbacks.invokeDirectly(resultCallback, false); -#endif // if defined(ENABLE_PDF) +#endif } /*! diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h index 9c87cbfe7..831879127 100644 --- a/src/webenginewidgets/api/qwebenginepage_p.h +++ b/src/webenginewidgets/api/qwebenginepage_p.h @@ -187,7 +187,7 @@ public: mutable QtWebEngineCore::CallbackDirectory m_callbacks; mutable QAction *actions[QWebEnginePage::WebActionCount]; -#if defined(ENABLE_PRINTING) +#if QT_CONFIG(webengine_printing_and_pdf) QPrinter *currentPrinter; #endif }; diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp index 81cf2e0e5..9497ba0fa 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -49,7 +49,7 @@ #include <QSGAbstractRenderer> #include <QSGNode> #include <QWindow> -#include <private/qquickwindow_p.h> +#include <QtQuick/private/qquickwindow_p.h> namespace QtWebEngineCore { diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro index a891c062e..c96bf15bb 100644 --- a/src/webenginewidgets/webenginewidgets.pro +++ b/src/webenginewidgets/webenginewidgets.pro @@ -1,4 +1,5 @@ -QT_FOR_CONFIG += webengine-private +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) +QT_FOR_CONFIG += webenginecore-private TARGET = QtWebEngineWidgets @@ -6,7 +7,7 @@ TARGET = QtWebEngineWidgets DEFINES += QT_BUILD_WEBENGINEWIDGETS_LIB QT += webenginecore widgets network quick -QT_PRIVATE += quick-private gui-private core-private widgets-private quickwidgets +QT_PRIVATE += quick-private gui-private core-private widgets-private quickwidgets webenginecore-private INCLUDEPATH += $$PWD api ../core ../core/api ../webengine/api @@ -44,13 +45,7 @@ HEADERS = \ api/qwebengineview_p.h \ render_widget_host_view_qt_delegate_widget.h -qtConfig(webengine-spellchecker) { - DEFINES += ENABLE_SPELLCHECK -} - qtConfig(webengine-printing-and-pdf) { - DEFINES += ENABLE_PRINTING - DEFINES += ENABLE_PDF QT += printsupport } diff --git a/tests/auto/quick/inspectorserver/inspectorserver.pro b/tests/auto/quick/inspectorserver/inspectorserver.pro index 1a2c2f053..fdc213f38 100644 --- a/tests/auto/quick/inspectorserver/inspectorserver.pro +++ b/tests/auto/quick/inspectorserver/inspectorserver.pro @@ -1,4 +1,4 @@ include(../tests.pri) QT += webengine -QT_PRIVATE += webengine-private +QT_PRIVATE += core-private webengine-private webenginecore-private DEFINES += IMPORT_DIR=\"\\\"$${ROOT_BUILD_DIR}$${QMAKE_DIR_SEP}imports\\\"\" diff --git a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp index e45b4466c..5f47ee797 100644 --- a/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp +++ b/tests/auto/quick/inspectorserver/tst_inspectorserver.cpp @@ -33,7 +33,7 @@ #include <QtQml/QQmlEngine> #include <QtTest/QtTest> #include <QQuickWebEngineProfile> -#include <private/qquickwebengineview_p.h> +#include <QtWebEngine/private/qquickwebengineview_p.h> #define INSPECTOR_SERVER_PORT "23654" static const QUrl s_inspectorServerHttpBaseUrl("http://localhost:" INSPECTOR_SERVER_PORT); diff --git a/tests/auto/quick/publicapi/publicapi.pro b/tests/auto/quick/publicapi/publicapi.pro index b178f56cd..c56fd2503 100644 --- a/tests/auto/quick/publicapi/publicapi.pro +++ b/tests/auto/quick/publicapi/publicapi.pro @@ -1,3 +1,3 @@ include(../tests.pri) QT += webengine -QT_PRIVATE += webengine-private +QT_PRIVATE += core-private webengine-private webenginecore-private diff --git a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro index 826b47de7..699186741 100644 --- a/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro +++ b/tests/auto/quick/qquickwebenginedefaultsurfaceformat/qquickwebenginedefaultsurfaceformat.pro @@ -1,6 +1,6 @@ include(../tests.pri) exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -QT_PRIVATE += webengine-private +QT_PRIVATE += core-private webengine-private webenginecore-private HEADERS += ../shared/util.h diff --git a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro b/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro index 25bf44597..c253bc2a6 100644 --- a/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro +++ b/tests/auto/quick/qquickwebengineview/qquickwebengineview.pro @@ -1,11 +1,6 @@ include(../tests.pri) exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -QT_PRIVATE += webengine-private gui-private +QT_PRIVATE += webengine-private gui-private webenginecore-private HEADERS += ../shared/util.h - -qtConfig(webengine-printing-and-pdf) { - DEFINES += ENABLE_PDF -} - diff --git a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp index b252fa763..42e96c0f5 100644 --- a/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp +++ b/tests/auto/quick/qquickwebengineview/tst_qquickwebengineview.cpp @@ -37,9 +37,9 @@ #include <QtQml/QQmlEngine> #include <QtTest/QtTest> #include <QtWebEngine/QQuickWebEngineProfile> -#include <private/qinputmethod_p.h> -#include <private/qquickwebengineview_p.h> -#include <private/qquickwebenginesettings_p.h> +#include <QtGui/private/qinputmethod_p.h> +#include <QtWebEngine/private/qquickwebengineview_p.h> +#include <QtWebEngine/private/qquickwebenginesettings_p.h> #include <qpa/qplatforminputcontext.h> #include <functional> @@ -623,8 +623,8 @@ void tst_QQuickWebEngineView::setZoomFactor() void tst_QQuickWebEngineView::printToPdf() { -#if !defined(ENABLE_PDF) - QSKIP("ENABLE_PDF"); +#if !QT_CONFIG(webengine_printing_and_pdf) + QSKIP("no webengine-printing-and-pdf"); #else QTemporaryDir tempDir(QDir::tempPath() + "/tst_qwebengineview-XXXXXX"); QVERIFY(tempDir.isValid()); @@ -650,7 +650,7 @@ void tst_QQuickWebEngineView::printToPdf() QList<QVariant> failedArguments = savePdfSpy.takeFirst(); QVERIFY2(failedArguments.at(0).toString() == path, "File path for second saved PDF does not match arguments"); QVERIFY2(failedArguments.at(1).toBool() == false, "Printing to PDF file succeeded though it should fail"); -#endif // !defined(ENABLE_PDF) +#endif // !QT_CONFIG(webengine_printing_and_pdf) } void tst_QQuickWebEngineView::stopSettingFocusWhenDisabled() diff --git a/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro b/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro index 2a2155e44..a0ee3fd89 100644 --- a/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro +++ b/tests/auto/quick/qquickwebengineviewgraphics/qquickwebengineviewgraphics.pro @@ -1,4 +1,4 @@ include(../tests.pri) CONFIG -= testcase # remove, once this passes in the CI exists($${TARGET}.qrc):RESOURCES += $${TARGET}.qrc -QT_PRIVATE += webengine-private gui-private +QT_PRIVATE += webengine-private gui-private webenginecore-private diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro index a28a401e9..02ce59f17 100644 --- a/tests/auto/quick/quick.pro +++ b/tests/auto/quick/quick.pro @@ -1,4 +1,5 @@ -QT_FOR_CONFIG += webengine-private +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093 +QT_FOR_CONFIG += webenginecore-private TEMPLATE = subdirs diff --git a/tests/auto/quick/shared/util.h b/tests/auto/quick/shared/util.h index bfe3ff9c6..c2e7d3e19 100644 --- a/tests/auto/quick/shared/util.h +++ b/tests/auto/quick/shared/util.h @@ -34,8 +34,8 @@ #include <QSignalSpy> #include <QTimer> #include <QtTest/QtTest> -#include <private/qquickwebengineview_p.h> -#include <private/qquickwebengineloadrequest_p.h> +#include <QtWebEngine/private/qquickwebengineview_p.h> +#include <QtWebEngine/private/qquickwebengineloadrequest_p.h> #if !defined(TESTS_SOURCE_DIR) #define TESTS_SOURCE_DIR "" @@ -108,7 +108,7 @@ inline bool waitForLoadFailed(QQuickWebEngineView *webEngineView, int timeout = inline bool waitForViewportReady(QQuickWebEngineView *webEngineView, int timeout = 10000) { -#ifdef ENABLE_QML_TESTSUPPORT_API +#if QT_CONFIG(webengine_testsupport) QSignalSpy spy(reinterpret_cast<QObject *>(webEngineView->testSupport()), SIGNAL(loadVisuallyCommitted())); return spy.wait(timeout); #else diff --git a/tests/auto/quick/tests.pri b/tests/auto/quick/tests.pri index 7983a248f..f809ebd68 100644 --- a/tests/auto/quick/tests.pri +++ b/tests/auto/quick/tests.pri @@ -1,5 +1,5 @@ -include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) -QT_FOR_CONFIG += webengine-private +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093 +QT_FOR_CONFIG += webenginecore-private TEMPLATE = app @@ -18,9 +18,4 @@ QT += testlib network quick webengine # This define is used by some tests to look up resources in the source tree DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD/\\\" - -qtConfig(webengine-testsupport) { - DEFINES += ENABLE_QML_TESTSUPPORT_API -} - include(../embed_info_plist.pri) diff --git a/tests/auto/widgets/tests.pri b/tests/auto/widgets/tests.pri index 5e6699cf8..7fd002235 100644 --- a/tests/auto/widgets/tests.pri +++ b/tests/auto/widgets/tests.pri @@ -1,4 +1,5 @@ -QT_FOR_CONFIG += webengine-private +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093 +QT_FOR_CONFIG += webenginecore-private TEMPLATE = app diff --git a/tests/auto/widgets/widgets.pro b/tests/auto/widgets/widgets.pro index 5a13e8075..778795743 100644 --- a/tests/auto/widgets/widgets.pro +++ b/tests/auto/widgets/widgets.pro @@ -1,4 +1,5 @@ -QT_FOR_CONFIG += webengine +include($$QTWEBENGINE_OUT_ROOT/src/core/qtwebenginecore-config.pri) # workaround for QTBUG-68093 +QT_FOR_CONFIG += webenginecore TEMPLATE = subdirs |