QWindow: Remove unnecessary cast
We already have a QMouseEvent, don't static_cast the QEvent again to the parent-class of QMouseEvent. Pick-to: 6.3 6.2 Change-Id: Ifd8a5a82d0a8ded564a68ec4f3ae877886c6e1c7 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
efe4863f83
commit
3ed7a5a963
@ -2566,9 +2566,8 @@ bool QWindow::event(QEvent *ev)
|
||||
};
|
||||
if (QMouseEvent *me = asMouseEvent(ev); me &&
|
||||
ev->type() == contextMenuTrigger && me->button() == Qt::RightButton) {
|
||||
QSinglePointEvent *pev = static_cast<QSinglePointEvent*>(ev);
|
||||
QContextMenuEvent e(QContextMenuEvent::Mouse, me->position().toPoint(),
|
||||
pev->globalPosition().toPoint(), pev->modifiers());
|
||||
me->globalPosition().toPoint(), me->modifiers());
|
||||
QGuiApplication::sendEvent(this, &e);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user