diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2016-10-26 14:43:54 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2016-10-26 12:56:08 +0000 |
commit | ee0a912ab4699f3e24563a856177d9b090a022fd (patch) | |
tree | 2d5a2505cc9f7b7439cf69cd3419a6dbcd623ed8 /src/webenginewidgets/api/qwebengineview_p.h | |
parent | 8caf750d57e9ebf7507f61951c45d3f31b5f5139 (diff) |
Prevent crash with overridden drag 'n drop event handlers
Suppose the user overrides QWebEngineView::dragEnterEvent without
calling the base implementation and without overriding dragLeaveEvent.
Then our implementation will notify chromium about the drag leave
without having ever seen a drag entering and crash. Only notify chromium
about leave/drop/move events if we've notified it about the drag enter
before. Also, catch the case where the user overrides dragLeaveEvent
without calling the base implementation.
Task-number: QTBUG-54896
Change-Id: Ib958040e5fa7ecab86bac9b724d478c81a521fcc
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebengineview_p.h')
-rw-r--r-- | src/webenginewidgets/api/qwebengineview_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebengineview_p.h b/src/webenginewidgets/api/qwebengineview_p.h index b98c553f4..45b3e266e 100644 --- a/src/webenginewidgets/api/qwebengineview_p.h +++ b/src/webenginewidgets/api/qwebengineview_p.h @@ -71,6 +71,7 @@ public: QWebEnginePage *page; bool m_pendingContextMenuEvent; + bool m_dragEntered; }; #ifndef QT_NO_ACCESSIBILITY |