From a9567edd777a2406b941ab29345e424fee462530 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 10 Oct 2016 14:10:32 +0200 Subject: 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 --- src/core/web_engine_context.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3