From 0c2bfc1103d9f74877027c78a094d003412611e2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 26 Oct 2020 07:50:13 -0700 Subject: [PATCH] cleanup: replace long obsolete delta() member This has been deprecated for years. The delta() member dealt with the old style mouse wheel that is associated with a vertical scroll - so we need the y-component. Signed-off-by: Dirk Hohndel --- profile-widget/profilewidget2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index fb2dff744..7dbb4cb05 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1014,10 +1014,10 @@ void ProfileWidget2::wheelEvent(QWheelEvent *event) QPoint toolTipPos = mapFromScene(toolTipItem->pos()); if (event->buttons() == Qt::LeftButton) return; - if (event->delta() > 0 && zoomLevel < 20) { + if (event->angleDelta().y() > 0 && zoomLevel < 20) { scale(zoomFactor, zoomFactor); zoomLevel++; - } else if (event->delta() < 0 && zoomLevel > 0) { + } else if (event->angleDelta().y() < 0 && zoomLevel > 0) { // Zooming out scale(1.0 / zoomFactor, 1.0 / zoomFactor); zoomLevel--;