summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_settings.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-03-31 20:19:10 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-04-02 22:30:20 +0000
commited5bd3c5638b237846234028381cab5d67669786 (patch)
treec09e224aba8800dba191e384a268247fffa681a2 /src/core/web_engine_settings.cpp
parent887b236e54354c53cf2714197e017488fc788b7a (diff)
Speculative fix for titleUpdate test case
After tedious investigation the issue boils down to error prone synchronization of web engine settings. WebEngineSettings are synchronized between the browser process and the render process. Moreover in the browser process the sync message is send to the render with QTimer::singleShot, which can cause race conditions if for example QWebPage::setUrl was used meanwhile. This makes current settings not being picked up by the render process and results in 'titleUpdate' test case flaky. This happens due to the fact that ShouldDisplayErrorPageForFailedLoad in the render process frame view could have invalid value. Try to sync web engine settings on every adapter load, setContent or reload. Mark some flaky settings in tests. Fixes: QTBUG-83078 Change-Id: I5289472f146e104d5cb6c3b9b20b26d3dc42f4b1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/web_engine_settings.cpp')
-rw-r--r--src/core/web_engine_settings.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index eb6db9793..c54570b33 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -333,6 +333,8 @@ void WebEngineSettings::doApply()
{
if (webPreferences.isNull())
return;
+
+ m_batchTimer.stop();
// Override with our settings when applicable
applySettingsToWebPreferences(webPreferences.data());
Q_ASSERT(m_adapter);