summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-10-10 14:10:32 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-10-11 22:23:50 +0000
commita9567edd777a2406b941ab29345e424fee462530 (patch)
tree7508911486da7596310206d4fd3f3c24b1f208f1
parentcdfa03ad7472eb374b2434926d058cf570bc4e37 (diff)
Respect command-line flags overriding our embedded defaults
Check if the opposite flag has been given by the user before adding our own defaults. Task-number: QTBUG-56432 Change-Id: I7d6b8fed2c3e20405e3986f9afeb2193751a93f3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--src/core/web_engine_context.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 7d1e5d609..bf6a6a172 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -296,8 +296,10 @@ WebEngineContext::WebEngineContext()
if (useEmbeddedSwitches) {
// Inspired by the Android port's default switches
- parsedCommandLine->AppendSwitch(switches::kEnableOverlayScrollbar);
- parsedCommandLine->AppendSwitch(switches::kEnablePinch);
+ if (!parsedCommandLine->HasSwitch(switches::kDisableOverlayScrollbar))
+ parsedCommandLine->AppendSwitch(switches::kEnableOverlayScrollbar);
+ if (!parsedCommandLine->HasSwitch(switches::kDisablePinch))
+ parsedCommandLine->AppendSwitch(switches::kEnablePinch);
parsedCommandLine->AppendSwitch(switches::kEnableViewport);
parsedCommandLine->AppendSwitch(switches::kMainFrameResizesAreOrientationChanges);
parsedCommandLine->AppendSwitch(switches::kDisableAcceleratedVideoDecode);