summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-04-18 14:42:00 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-04-18 14:42:00 +0200
commitee2b1e71a80f88de90a03e10a89ba491ef99d308 (patch)
treeb14cd541a3f7ad1fc6739e0f5a02d479334b6b34 /src/core
parent61bdfb046700068afe36007ede3dcba1104099a3 (diff)
parent7db354d1a21a17da76244b77c35d7297be3a86a9 (diff)
Merge branch '5.6' into 5.7
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core_module.pro8
-rw-r--r--src/core/media_capture_devices_dispatcher.cpp2
-rw-r--r--src/core/network_delegate_qt.cpp3
-rw-r--r--src/core/resources/resources.gyp26
-rw-r--r--src/core/url_request_context_getter_qt.cpp5
-rw-r--r--src/core/web_engine_context.cpp23
6 files changed, 35 insertions, 32 deletions
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
index 6d2d11d40..fa402cc63 100644
--- a/src/core/core_module.pro
+++ b/src/core/core_module.pro
@@ -102,6 +102,14 @@ icu.files = $$OUT_PWD/$$getConfigDir()/icudtl.dat
resources2build.CONFIG = no_link no_clean target_predeps
QMAKE_EXTRA_COMPILERS += resources2build
+
+ locales2build.input = locales.files
+ locales2build.output = $$[QT_INSTALL_DATA/get]/translations/qtwebengine_locales/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
+ locales2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ locales2build.name = COPY ${QMAKE_FILE_IN}
+ locales2build.CONFIG = no_link no_clean target_predeps
+
+ QMAKE_EXTRA_COMPILERS += locales2build
}
}
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp
index 4d1e8b200..4d11277b0 100644
--- a/src/core/media_capture_devices_dispatcher.cpp
+++ b/src/core/media_capture_devices_dispatcher.cpp
@@ -63,6 +63,8 @@
#include "media/audio/audio_manager_base.h"
#include "ui/base/l10n/l10n_util.h"
+#include <QtCore/qcoreapplication.h>
+
namespace QtWebEngineCore {
using content::BrowserThread;
diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp
index cb2a9dc58..b1a2faf8d 100644
--- a/src/core/network_delegate_qt.cpp
+++ b/src/core/network_delegate_qt.cpp
@@ -125,7 +125,8 @@ int NetworkDelegateQt::OnBeforeURLRequest(net::URLRequest *request, const net::C
request->SetExtraRequestHeaderByName(header.key().toStdString(), header.value().toStdString(), /* overwrite */ true);
}
- return result;
+ if (result != net::OK)
+ return result;
}
}
diff --git a/src/core/resources/resources.gyp b/src/core/resources/resources.gyp
index 4226b7561..88c5bb4be 100644
--- a/src/core/resources/resources.gyp
+++ b/src/core/resources/resources.gyp
@@ -87,32 +87,6 @@
'includes': [ 'repack_locales.gypi' ],
},
],
- 'conditions': [
- ['qt_install_data != ""', {
- 'copies': [
- {
- 'destination': '<(qt_install_data)/resources',
- 'files': [ '<(SHARED_INTERMEDIATE_DIR)/repack/qtwebengine_resources.pak' ],
- },
- {
- 'destination': '<(qt_install_data)/resources',
- 'files': [ '<(SHARED_INTERMEDIATE_DIR)/repack/qtwebengine_resources_100p.pak' ],
- },
- {
- 'destination': '<(qt_install_data)/resources',
- 'files': [ '<(SHARED_INTERMEDIATE_DIR)/repack/qtwebengine_resources_200p.pak' ],
- },
- ],
- }],
- ['qt_install_translations != ""', {
- 'copies': [
- {
- 'destination': '<(qt_install_translations)/qtwebengine_locales',
- 'files': [ '<@(locale_files)' ],
- },
- ],
- }],
- ],
}
]
}
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index ca79b55d4..f80aa194b 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -157,8 +157,11 @@ void URLRequestContextGetterQt::generateStorage()
Q_ASSERT(m_urlRequestContext);
// We must stop all requests before deleting their backends.
- if (m_storage)
+ if (m_storage) {
cancelAllUrlRequests();
+ // we need to get rid of dangling pointer due to coming storage deletion
+ m_urlRequestContext->set_http_transaction_factory(0);
+ }
m_storage.reset(new net::URLRequestContextStorage(m_urlRequestContext.get()));
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index bf7b29435..b3bfc432b 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -113,7 +113,9 @@ void destroyContext()
bool usingANGLE()
{
#if defined(Q_OS_WIN)
- return qt_gl_global_share_context()->isOpenGLES();
+ if (qt_gl_global_share_context())
+ return qt_gl_global_share_context()->isOpenGLES();
+ return QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES;
#else
return false;
#endif
@@ -296,10 +298,23 @@ WebEngineContext::WebEngineContext()
parsedCommandLine->AppendSwitch(switches::kDisableGpu);
} else {
const char *glType = 0;
- if (qt_gl_global_share_context()->isOpenGLES()) {
- glType = gfx::kGLImplementationEGLName;
+ if (qt_gl_global_share_context()) {
+ if (qt_gl_global_share_context()->isOpenGLES()) {
+ glType = gfx::kGLImplementationEGLName;
+ } else {
+ glType = gfx::kGLImplementationDesktopName;
+ }
} else {
- glType = gfx::kGLImplementationDesktopName;
+ qWarning("WebEngineContext used before QtWebEngine::initialize()");
+ // We have to assume the default OpenGL module type will be used.
+ switch (QOpenGLContext::openGLModuleType()) {
+ case QOpenGLContext::LibGL:
+ glType = gfx::kGLImplementationDesktopName;
+ break;
+ case QOpenGLContext::LibGLES:
+ glType = gfx::kGLImplementationEGLName;
+ break;
+ }
}
parsedCommandLine->AppendSwitchASCII(switches::kUseGL, glType);