Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.5.1
Description
Q_ASSERT on qwebenginepage.cpp fails when the QEvent::ContextMenu event is handled on the event filter.
Example code from the event filter that consumes QEvent::ContextMenu (full example code attached):
bool eventFilter(QObject* watched, QEvent* event) { QWebEngineView* view = qobject_cast<QWebEngineView*>(watched); if (view) { if (event->type() == QEvent::ContextMenu) { qDebug()<< "Do something for QEvent::ContextMenu."; return true; }
Attached example application demonstrates the use case (event filter is found from mainwindow.h):
- run the example on debug mode and press the right mouse key --> ASSERT failure:
Starting D:\mycases\build-bser-Desktop_Qt_5_5_1_MSVC2013_64bit-Debug\debug\bser.exe... Do something for QEvent::ContextMenu. ASSERT: "view->d_func()->m_pendingContextMenuEvent" in file api\qwebenginepage.cpp, line 728