From a061a646429c6e9d695458fc0ecb0021a30e12ee Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 4 Jun 2020 18:07:06 +0200 Subject: Replace calls to deprecated QEvent accessor functions Many of these were generated by clazy using the new qevent-accessors check. Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0 Reviewed-by: Volker Hilsheimer --- src/widgets/widgets/qmenubar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/widgets/widgets/qmenubar.cpp') diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index b45a6b5b01..b7c071bfcd 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -1053,12 +1053,12 @@ void QMenuBar::mousePressEvent(QMouseEvent *e) d->mouseDown = true; - QAction *action = d->actionAt(e->pos()); + QAction *action = d->actionAt(e->position().toPoint()); if (!action || !d->isVisible(action) || !action->isEnabled()) { d->setCurrentAction(nullptr); #if QT_CONFIG(whatsthis) if (QWhatsThis::inWhatsThisMode()) - QWhatsThis::showText(e->globalPos(), d->whatsThis, this); + QWhatsThis::showText(e->globalPosition().toPoint(), d->whatsThis, this); #endif return; } @@ -1084,7 +1084,7 @@ void QMenuBar::mouseReleaseEvent(QMouseEvent *e) return; d->mouseDown = false; - QAction *action = d->actionAt(e->pos()); + QAction *action = d->actionAt(e->position().toPoint()); // do noting if the action is hidden if (!d->isVisible(action)) @@ -1222,7 +1222,7 @@ void QMenuBar::mouseMoveEvent(QMouseEvent *e) } bool popupState = d->popupState || d->mouseDown; - QAction *action = d->actionAt(e->pos()); + QAction *action = d->actionAt(e->position().toPoint()); if ((action && d->isVisible(action)) || !popupState) d->setCurrentAction(action, popupState); } -- cgit v1.2.3