summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-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
6 files changed, 32 insertions, 22 deletions
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"));