diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2022-01-13 22:56:30 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-14 19:48:54 +0000 |
commit | 8d8a933a78360198169aa600271564ad52eff49a (patch) | |
tree | 0fa0813cb24d15767704cc3002e57b6cff2f750c /src/gui/kernel | |
parent | 30cefa1c790edc57eadde127c0e0049522abecab (diff) |
QWindow: Remove unnecessary cast
We already have a QMouseEvent, don't static_cast the QEvent again to the
parent-class of QMouseEvent.
Change-Id: Ifd8a5a82d0a8ded564a68ec4f3ae877886c6e1c7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 3ed7a5a963b89554de9ebdb025c2783b4cee8177)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/kernel')
-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 a167d6e249..cf1dabbff9 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -2563,9 +2563,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 |