Commit 17496485 authored by Igor Kushnir's avatar Igor Kushnir
Browse files

StandardDocumentationView: remove obsolete context menu workaround

The workaround is no longer needed in Qt 5.10 or later. Qt 5.15 is the
minimum Qt version supported by KDevelop for a while now.

I have verified that this commit does not affect the Documentation tool
view's context menu appearance with Qt 5.15.
parent c13410b0
Pipeline #192615 canceled with stage
......@@ -122,12 +122,6 @@ public:
// workaround for Qt::NoContextMenu broken with QWebEngineView, contextmenu event is always eaten
// see
// we have to enforce deferring of event ourselves in the event filter.
// TODO: remove the context menu workaround (most of this comment and ContextMenu-related code in
// StandardDocumentationView::eventFilter()) once we require Qt 5.10 or later, because
// QTBUG-62345 was fixed in Qt 5.10.0 Beta 4.
// The event filter is necessary for handling mouse events since they are swallowed by
// QWebView and QWebEngineView.
......@@ -398,16 +392,11 @@ bool StandardDocumentationView::eventFilter(QObject* object, QEvent* event)
if (object == d->m_view) {
// help QWebEngineView properly behave like expected as if Qt::NoContextMenu was set
if (event->type() == QEvent::ContextMenu) {
return true;
/* HACK / Workaround for QTBUG-43602
* Need to set an eventFilter on the child of WebengineView because it swallows
* mouse events.
else if (event->type() == QEvent::ChildAdded) {
if (event->type() == QEvent::ChildAdded) {
QObject* child = static_cast<QChildEvent*>(event)->child();
if(qobject_cast<QWidget*>(child)) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment