diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-01-13 22:56:30 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-01-14 18:57:41 +0100 |
commit | 3ed7a5a963b89554de9ebdb025c2783b4cee8177 (patch) | |
tree | c8bfc09374854b6752b3cfb91a94736e19bd4530 /src/gui/kernel/qwindow.cpp | |
parent | efe4863f837834c1664e37bf439bdec399f1dc88 (diff) |
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>
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index dc55c3c787..2a2a2c542f 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -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 |