summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-27 11:28:30 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-11-02 12:42:10 +0100
commit13ac394567cb287c5caceef15f531544d73fde09 (patch)
tree38a497e108b6de6c98e9621e75def96dd8b6a55e /src/core
parentf51f50c22e770e1ab20ecccc8a32906e4014caed (diff)
Update dependencies on 'dev' in qt/qtwebengine
Change-Id: I74c7293ebf5ace5bd07e3bf5455dd90bf4ed6380 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ozone/gl_context_qt.cpp4
-rw-r--r--src/core/ozone/gl_share_context_qt.cpp8
-rw-r--r--src/core/web_engine_context.cpp8
-rw-r--r--src/core/web_engine_library_info.cpp10
4 files changed, 18 insertions, 12 deletions
diff --git a/src/core/ozone/gl_context_qt.cpp b/src/core/ozone/gl_context_qt.cpp
index e511e8eb5..f4d3f1618 100644
--- a/src/core/ozone/gl_context_qt.cpp
+++ b/src/core/ozone/gl_context_qt.cpp
@@ -177,7 +177,7 @@ void *GLContextHelper::getGlxPlatformInterface()
{
#if QT_CONFIG(opengl) && defined(USE_GLX)
if (QOpenGLContext *context = qt_gl_global_share_context())
- return context->platformInterface<QPlatformInterface::QGLXContext>();
+ return context->nativeInterface<QNativeInterface::QGLXContext>();
#endif
return nullptr;
}
@@ -186,7 +186,7 @@ void *GLContextHelper::getEglPlatformInterface()
{
#if QT_CONFIG(opengl) && QT_CONFIG(egl)
if (QOpenGLContext *context = qt_gl_global_share_context())
- return context->platformInterface<QPlatformInterface::QEGLContext>();
+ return context->nativeInterface<QNativeInterface::QEGLContext>();
#endif
return nullptr;
}
diff --git a/src/core/ozone/gl_share_context_qt.cpp b/src/core/ozone/gl_share_context_qt.cpp
index 669652057..c2cfecb8b 100644
--- a/src/core/ozone/gl_share_context_qt.cpp
+++ b/src/core/ozone/gl_share_context_qt.cpp
@@ -57,21 +57,21 @@ QtShareGLContext::QtShareGLContext(QOpenGLContext *qtContext)
#if QT_CONFIG(opengl)
QOpenGLContext *context = QOpenGLContext::globalShareContext();
#if defined(Q_OS_MACOS)
- auto *ctx = context->platformInterface<QPlatformInterface::QCocoaGLContext>();
+ auto *ctx = context->nativeInterface<QNativeInterface::QCocoaGLContext>();
if (ctx)
m_handle = cglContext(ctx->nativeContext());
#endif
#if defined(Q_OS_WIN)
- auto *ctx = context->platformInterface<QPlatformInterface::QWGLContext>();
+ auto *ctx = context->nativeInterface<QNativeInterface::QWGLContext>();
#endif
#if defined(Q_OS_LINUX)
- auto *ctx = context->platformInterface<QPlatformInterface::QGLXContext>();
+ auto *ctx = context->nativeInterface<QNativeInterface::QGLXContext>();
#endif
if (ctx && !m_handle)
m_handle = (void *)ctx->nativeContext();
#if QT_CONFIG(egl)
if (!m_handle) {
- auto *ctx = context->platformInterface<QPlatformInterface::QEGLContext>();
+ auto *ctx = context->nativeInterface<QNativeInterface::QEGLContext>();
if (ctx)
m_handle = (void *)ctx->nativeContext();
}
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 32701f230..5c125bb8f 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -162,6 +162,9 @@ static bool usingANGLE()
static bool usingDefaultSGBackend()
{
+ if (QQuickWindow::graphicsApi() != QSGRendererInterface::OpenGL)
+ return false;
+
const QStringList args = QGuiApplication::arguments();
//folow logic from contextFactory in src/quick/scenegraph/qsgcontextplugin.cpp
@@ -187,7 +190,7 @@ bool usingSoftwareDynamicGL()
if (QCoreApplication::testAttribute(Qt::AA_UseSoftwareOpenGL))
return true;
#if defined(Q_OS_WIN)
- HMODULE handle = QPlatformInterface::QWGLContext::openGLModuleHandle();
+ HMODULE handle = QNativeInterface::QWGLContext::openGLModuleHandle();
wchar_t path[MAX_PATH];
DWORD size = GetModuleFileName(handle, path, MAX_PATH);
QFileInfo openGLModule(QString::fromWCharArray(path, size));
@@ -652,6 +655,9 @@ WebEngineContext::WebEngineContext()
// Enable sandboxing on OS X and Linux (Desktop / Embedded) by default.
bool disable_sandbox = qEnvironmentVariableIsSet(kDisableSandboxEnv);
+#if defined(Q_OS_WIN)
+ disable_sandbox = true; // FIXME: Windows sandbox no longer works on CI, but works fine locally.
+#endif
if (!disable_sandbox) {
#if defined(Q_OS_LINUX)
parsedCommandLine->AppendSwitch(service_manager::switches::kDisableSetuidSandbox);
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index fa9e34268..aa3dd7bdc 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -166,7 +166,7 @@ QString subProcessPath()
candidatePaths << getPath(frameworkBundle())
% QStringLiteral("/Helpers/" QTWEBENGINEPROCESS_NAME ".app/Contents/MacOS/" QTWEBENGINEPROCESS_NAME);
#else
- candidatePaths << QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath)
+ candidatePaths << QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)
% QLatin1Char('/') % processBinary;
#endif
candidatePaths << QCoreApplication::applicationDirPath()
@@ -203,7 +203,7 @@ QString localesPath()
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
getResourcesPath(frameworkBundle()) % QLatin1String("/qtwebengine_locales");
#else
- QLibraryInfo::location(QLibraryInfo::TranslationsPath) % QDir::separator() % QLatin1String("qtwebengine_locales");
+ QLibraryInfo::path(QLibraryInfo::TranslationsPath) % QDir::separator() % QLatin1String("qtwebengine_locales");
#endif
if (!initialized) {
@@ -252,7 +252,7 @@ QString dictionariesPath()
candidatePaths << frameworkDictionariesPath;
#endif
- QString libraryDictionariesPath = QLibraryInfo::location(QLibraryInfo::DataPath)
+ QString libraryDictionariesPath = QLibraryInfo::path(QLibraryInfo::DataPath)
% QDir::separator() % QLatin1String("qtwebengine_dictionaries");
candidatePaths << libraryDictionariesPath;
}
@@ -276,13 +276,13 @@ QString resourcesDataPath()
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
getResourcesPath(frameworkBundle());
#else
- QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources");
+ QLibraryInfo::path(QLibraryInfo::DataPath) % QLatin1String("/resources");
#endif
if (!initialized) {
initialized = true;
if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) {
qWarning("Qt WebEngine resources not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath));
- potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath);
+ potentialResourcesPath = QLibraryInfo::path(QLibraryInfo::DataPath);
}
if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) {
qWarning("Qt WebEngine resources not found at %s. Trying application directory...", qPrintable(potentialResourcesPath));