summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-05 11:15:06 +0200
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-05-05 11:15:06 +0200
commit028bd20e41fc1995c34ca4c19e5342ff3efe0c6a (patch)
tree71aa1e77a262ba2d2a72dc6ac8f5c5c3a26567f2 /src
parent4ea591e7efdb63c26372af4af9507c5f57b42fcc (diff)
parentb24a6419869c14e32e87cb97e529cc25c246b5e0 (diff)
Merge 5.9 into 5.9.0v5.9.0-beta4
Diffstat (limited to 'src')
m---------src/3rdparty0
-rw-r--r--src/buildtools/gn.pro46
-rw-r--r--src/buildtools/ninja.pro36
-rw-r--r--src/core/core.pro2
-rw-r--r--src/core/core_common.pri4
-rw-r--r--src/core/core_module.pro3
-rw-r--r--src/core/core_project.pro17
-rw-r--r--src/core/gn_run.pro25
-rw-r--r--src/core/web_engine_context.cpp3
-rw-r--r--src/webengine/doc/qtwebengine.qdocconf2
-rw-r--r--src/webengine/webengine.pro3
11 files changed, 70 insertions, 71 deletions
diff --git a/src/3rdparty b/src/3rdparty
-Subproject 853d4069e45b06106f33611c458f5480f71e7c5
+Subproject 898afbbf79637101bbd5e6ab12695ced6a759ae
diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro
index 092888e0e..829e7a31a 100644
--- a/src/buildtools/gn.pro
+++ b/src/buildtools/gn.pro
@@ -1,36 +1,30 @@
TEMPLATE = aux
-CONFIG += release
-
option(host_build)
-defineReplace(buildGn) {
- gn_args = $$1
- out = $$gnPath()
- !qtConfig(system-ninja): ninja_path = "--path $$ninjaPath()"
- # check if it is not already build
- !exists($$out) {
- mkpath($$dirname(out))
- src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
- gn_bootstrap = $$system_path($$absolute_path(chromium/tools/gn/bootstrap/bootstrap.py, $$src_3rd_party_dir))
- gn_args = $$system_quote($$gn_args)
- gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path
- !system("cd $$system_quote($$system_path($$dirname(out))) && python $$gn_configure") {
- error("GN build error!")
- }
- }
-}
+!debug_and_release: CONFIG += release
isQtMinimum(5, 8) {
include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private
}
-!qtConfig(system-gn) {
- buildgn.target = build_gn
- buildgn.commands = $$buildGn($$gnArgs())
- QMAKE_EXTRA_TARGETS += buildgn
-
- default_target.target = first
- default_target.depends = buildgn
- QMAKE_EXTRA_TARGETS += default_target
+build_pass|!debug_and_release {
+ !qtConfig(system-gn): CONFIG(release, debug|release) {
+ buildgn.target = build_gn
+ gn_args = $$gnArgs()
+ out = $$gnPath()
+ !qtConfig(system-ninja): ninja_path = "--path $$ninjaPath()"
+ # check if it is not already build
+ !exists($$out) {
+ mkpath($$dirname(out))
+ src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
+ gn_bootstrap = $$system_path($$absolute_path(chromium/tools/gn/bootstrap/bootstrap.py, $$src_3rd_party_dir))
+ gn_args = $$system_quote($$gn_args)
+ gn_configure = $$system_quote($$gn_bootstrap) --shadow --gn-gen-args=$$gn_args $$ninja_path
+ !system("cd $$system_quote($$system_path($$dirname(out))) && $$pythonPathForSystem() $$gn_configure") {
+ error("GN build error!")
+ }
+ }
+ QMAKE_DISTCLEAN += $$out
+ }
}
diff --git a/src/buildtools/ninja.pro b/src/buildtools/ninja.pro
index c391d6e84..1b17c6dfa 100644
--- a/src/buildtools/ninja.pro
+++ b/src/buildtools/ninja.pro
@@ -1,31 +1,25 @@
TEMPLATE = aux
-CONFIG += release
-defineReplace(buildNinja) {
- out = $$ninjaPath()
- # check if it is not already build
- !exists($$out) {
- mkpath($$dirname(out))
- src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
- ninja_configure = $$system_quote($$system_path($$absolute_path(ninja/configure.py, $$src_3rd_party_dir)))
- !system("cd $$system_quote($$system_path($$dirname(out))) && python $$ninja_configure --bootstrap") {
- error("NINJA build error!")
- }
- }
-}
+!debug_and_release: CONFIG += release
isQtMinimum(5, 8) {
include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
QT_FOR_CONFIG += webengine-private
}
-!qtConfig(system-ninja) {
- buildninja.target = build_ninja
- buildninja.commands = $$buildNinja()
- QMAKE_EXTRA_TARGETS += buildninja
-
- default_target.target = first
- default_target.depends = buildninja
- QMAKE_EXTRA_TARGETS += default_target
+build_pass|!debug_and_release {
+ !qtConfig(system-ninja): CONFIG(release, debug|release) {
+ out = $$ninjaPath()
+ # check if it is not already build
+ !exists($$out) {
+ mkpath($$dirname(out))
+ src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
+ ninja_configure = $$system_quote($$system_path($$absolute_path(ninja/configure.py, $$src_3rd_party_dir)))
+ !system("cd $$system_quote($$system_path($$dirname(out))) && $$pythonPathForSystem() $$ninja_configure --bootstrap") {
+ error("NINJA build error!")
+ }
+ }
+ QMAKE_DISTCLEAN += $$out
+ }
}
diff --git a/src/core/core.pro b/src/core/core.pro
index 91c5044b6..6cc8080e0 100644
--- a/src/core/core.pro
+++ b/src/core/core.pro
@@ -41,7 +41,7 @@ core_api.depends = gn_run
# A fake project for qt creator
core_project.file = core_project.pro
-core_project.depends = core_headers
+core_project.depends = gn_run
SUBDIRS += \
core_headers \
diff --git a/src/core/core_common.pri b/src/core/core_common.pri
index 9c29aea71..370fe4d2a 100644
--- a/src/core/core_common.pri
+++ b/src/core/core_common.pri
@@ -5,8 +5,4 @@ TARGET = QtWebEngineCore
QT += qml quick webchannel
QT_PRIVATE += quick-private gui-private core-private webenginecoreheaders-private
-# Make QtCreator happy.
-CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir()
-INCLUDEPATH += $$CHROMIUM_SRC_DIR
-
qtHaveModule(positioning):QT += positioning
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index f4f3fb736..44e8ac613 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -130,9 +130,6 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
}
OTHER_FILES = \
- $$files(../3rdparty/chromium/*.h, true) \
- $$files(../3rdparty/chromium/*.cc, true) \
- $$files(../3rdparty/chromium/*.mm, true) \
$$files(../3rdparty/chromium/*.py, true) \
$$files(../3rdparty/chromium/*.gyp, true) \
$$files(../3rdparty/chromium/*.gypi, true) \
diff --git a/src/core/core_project.pro b/src/core/core_project.pro
index 8418ab22b..c046ce1ff 100644
--- a/src/core/core_project.pro
+++ b/src/core/core_project.pro
@@ -1,3 +1,18 @@
TEMPLATE = lib
+# Fake project to make QtCreator happy.
-include(core_chromium.pri)
+include(core_common.pri)
+
+linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri
+
+!include($$linking_pri) {
+ error("Could not find the linking information that gn should have generated.")
+}
+
+CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir()
+INCLUDEPATH += $$CHROMIUM_SRC_DIR \
+ $$OUT_PWD/$$getConfigDir()/gen
+
+SOURCES += $$NINJA_SOURCES
+HEADERS += $$NINJA_HEADERS
+DEFINES += $$NINJA_DEFINES
diff --git a/src/core/gn_run.pro b/src/core/gn_run.pro
index 07635d04c..ee4e7892e 100644
--- a/src/core/gn_run.pro
+++ b/src/core/gn_run.pro
@@ -5,13 +5,6 @@ isQtMinimum(5, 8) {
TEMPLATE = aux
-defineReplace(runGn) {
- message("Running: $$1")
- !system($$1) {
- error("GN run error!")
- }
-}
-
qtConfig(debug_and_release): CONFIG += debug_and_release build_all
qtConfig(system-ninja) {
@@ -42,16 +35,22 @@ build_pass|!debug_and_release {
gn_args += is_debug=false
}
- gn_args += "qtwebengine_target=\"$$shell_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\""
+ gn_args += "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtWebEngineCore\""
!qtConfig(system-gn) {
- gn_binary = $$shell_quote($$shell_path($$gnPath()))
+ gn_binary = $$system_quote($$system_path($$gnPath()))
}
- gn_args = $$shell_quote($$gn_args)
- gn_src_root = $$shell_quote($$shell_path($$QTWEBENGINE_ROOT/$$getChromiumSrcDir()))
- gn_build_root = $$shell_quote($$shell_path($$OUT_PWD/$$getConfigDir()))
- $$runGn($$gn_binary gen $$gn_build_root --args=$$gn_args --root=$$gn_src_root)
+ gn_args = $$system_quote($$gn_args)
+ gn_src_root = $$system_quote($$system_path($$QTWEBENGINE_ROOT/$$getChromiumSrcDir()))
+ gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir()))
+ gn_python = "--script-executable=$$pythonPathForSystem()"
+ gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root
+
+ message("Running: $$gn_run ")
+ !system($$gn_run) {
+ error("GN run error!")
+ }
runninja.commands = $$NINJA \$\(NINJAFLAGS\) -C $$gn_build_root QtWebEngineCore
QMAKE_EXTRA_TARGETS += runninja
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 81f968d11..60622b4ae 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -91,6 +91,7 @@
#ifndef QT_NO_OPENGL
# include <QOpenGLContext>
#endif
+#include <QQuickWindow>
#include <QStringList>
#include <QSurfaceFormat>
#include <QVector>
@@ -158,6 +159,8 @@ bool usingQtQuick2DRenderer()
}
if (device.isEmpty())
+ device = QQuickWindow::sceneGraphBackend();
+ if (device.isEmpty())
device = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND"));
if (device.isEmpty())
device = QString::fromLocal8Bit(qgetenv("QMLSCENE_DEVICE"));
diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf
index fe83b082f..bc63addbe 100644
--- a/src/webengine/doc/qtwebengine.qdocconf
+++ b/src/webengine/doc/qtwebengine.qdocconf
@@ -67,7 +67,7 @@ exampledirs += . \
../../core/doc/snippets \
../../webenginewidgets/doc/snippets
-examples.fileextensions += *.aff *.dic
+examples.fileextensions += *.aff *.dic *.html
imagedirs += images
diff --git a/src/webengine/webengine.pro b/src/webengine/webengine.pro
index 27239225b..5ac93c9a7 100644
--- a/src/webengine/webengine.pro
+++ b/src/webengine/webengine.pro
@@ -71,9 +71,10 @@ use?(pdf) {
}
!build_pass {
+ python = $$pythonPathForShell()
chromium_attributions.commands = \
cd $$shell_quote($$shell_path($$PWD/../3rdparty)) && \
- python chromium/tools/licenses.py \
+ $$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))