summaryrefslogtreecommitdiffstats
path: root/src/core/content_main_delegate_qt.cpp
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2014-02-13 12:13:15 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-13 14:28:04 +0100
commit514b9f71de89a14401e305f32c61fbad5759e5f2 (patch)
treeb28a799abaf06ac6eeaf7cb1de6c640fdda4d26f /src/core/content_main_delegate_qt.cpp
parent33237bd32f13fbabb7be248a1d46323c89edf57c (diff)
Fix path service assertions
Registering a path provider did not turn out to be a clean enough solution for overriding chromium paths because of debug assertions that require the key range not to collide with already registered path providers. Instead of patching chromium or using workarounds switch back to using PathService::Override and only replace the jni-based default PathProviderAndroid on embedded android. Change-Id: I4530bc8fa3eba36c0d2403729be9a792f3c2120f Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/core/content_main_delegate_qt.cpp')
-rw-r--r--src/core/content_main_delegate_qt.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index 43cca7ef9..f75204ada 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -63,8 +63,9 @@ static base::StringPiece PlatformResourceProvider(int key) {
void ContentMainDelegateQt::PreSandboxStartup()
{
- // Register the Qt path provider which handles necessary paths for base, ui and content.
- PathService::RegisterProvider(WebEngineLibraryInfo::pathProviderQt, base::PATH_START, content::PATH_END);
+ PathService::Override(base::FILE_EXE, WebEngineLibraryInfo::getPath(base::FILE_EXE));
+ PathService::Override(content::DIR_MEDIA_LIBS, WebEngineLibraryInfo::getPath(content::DIR_MEDIA_LIBS));
+ PathService::Override(ui::DIR_LOCALES, WebEngineLibraryInfo::getPath(ui::DIR_LOCALES));
net::NetModule::SetResourceProvider(PlatformResourceProvider);
ui::ResourceBundle::InitSharedInstanceWithLocale(l10n_util::GetApplicationLocale(std::string("en-US")), 0);