From 1f77d4709946511b919810354f19875824399096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCri=20Valdmann?= Date: Mon, 18 Feb 2019 16:10:17 +0100 Subject: Fix crash on dynamic_cast in global event filter Installing an event filter on QApplication which uses dynamic_cast will crash the application since QtWebEngine is sending QTimerEvents to classes without RTTI information. Fix by 1. Moving the QObject part of MessagePumpForUIQt into api/ as a private class. 2. Using QTimer directly in WebEngineSettings, without subclassing. Fixes: QTBUG-73833 Change-Id: Ida73006a4fef76637c964f8f05468adcc4a190ce Reviewed-by: Allan Sandfeld Jensen --- src/core/web_engine_settings.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/core/web_engine_settings.h') diff --git a/src/core/web_engine_settings.h b/src/core/web_engine_settings.h index 06a7a6004..8930d7c27 100644 --- a/src/core/web_engine_settings.h +++ b/src/core/web_engine_settings.h @@ -57,6 +57,7 @@ #include #include #include +#include namespace content { struct RendererPreferences; @@ -65,7 +66,6 @@ struct WebPreferences; } namespace QtWebEngineCore { -class BatchTimer; class WebContentsAdapter; class QWEBENGINECORE_PRIVATE_EXPORT WebEngineSettings { @@ -177,7 +177,7 @@ private: QHash m_fontSizes; QString m_defaultEncoding; QScopedPointer webPreferences; - QScopedPointer m_batchTimer; + QTimer m_batchTimer; WebEngineSettings *parentSettings; QSet childSettings; @@ -187,7 +187,6 @@ private: static QHash s_defaultFontSizes; UnknownUrlSchemePolicy m_unknownUrlSchemePolicy; - friend class BatchTimer; friend class WebContentsAdapter; }; -- cgit v1.2.3