diff options
author | Zoltan Arvai <zarvai@inf.u-szeged.hu> | 2014-01-13 15:21:17 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-13 17:13:11 +0100 |
commit | 7c2d0327b7219e500586c680329db6afd5dfd08d (patch) | |
tree | b3260d339eceef446720eb7d65629b7aff47d771 /src/core/web_engine_context.cpp | |
parent | 7482b202de0dfeae309fe2e990276b7c43dda3cb (diff) |
Fix WebEngineContext on Windows
AppendSwitchASCII won't accept WChars, it would need WideToASCII
conversion. But on OS_WIN AppendSwitchASCII method only wraps
parameters for AppendSwitchNative with ASCIIToWide.
Doing ASCIIToWide(WideToASCII()) not seems to be a useful idea,
so we should call directly AppendSwitchNative on Windows.
See chromium/base/command_line.cc.
Change-Id: I9733993840ddaef2dbb3176135977c39a967e381
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'src/core/web_engine_context.cpp')
-rw-r--r-- | src/core/web_engine_context.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index adc7e7dac..28d336e9d 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -131,7 +131,11 @@ WebEngineContext::WebEngineContext(WebContentsAdapterClient::RenderingMode rende CommandLine* parsedCommandLine = CommandLine::ForCurrentProcess(); parsedCommandLine->AppendSwitchASCII(switches::kUserAgent, webkit_glue::BuildUserAgentFromProduct("QtWebEngine/0.1")); +#if defined(OS_WIN) + parsedCommandLine->AppendSwitchNative(switches::kBrowserSubprocessPath,WebEngineLibraryInfo::subProcessPath().value().c_str()); +#else parsedCommandLine->AppendSwitchASCII(switches::kBrowserSubprocessPath, WebEngineLibraryInfo::subProcessPath().value().c_str()); +#endif parsedCommandLine->AppendSwitch(switches::kNoSandbox); parsedCommandLine->AppendSwitch(switches::kDisablePlugins); |