From c99f12e8fec20fa056c1c0f23e07caebf66e3474 Mon Sep 17 00:00:00 2001 From: zneix Date: Sat, 31 Jul 2021 18:50:35 +0200 Subject: [PATCH] Removed unused QDesktopWidget includes Also made the overlooked deprecation fixes (which is now a necessary fix because deprecation warning became a compilation error now), Extends #2647 --- src/singletons/WindowManager.cpp | 1 - src/widgets/BaseWindow.cpp | 5 ++--- src/widgets/TooltipWidget.cpp | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/singletons/WindowManager.cpp b/src/singletons/WindowManager.cpp index af66ffcad..ac01f2dbe 100644 --- a/src/singletons/WindowManager.cpp +++ b/src/singletons/WindowManager.cpp @@ -1,7 +1,6 @@ #include "singletons/WindowManager.hpp" #include -#include #include #include #include diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index cd0e8ec58..abbde6a31 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include #include @@ -349,14 +348,14 @@ bool BaseWindow::event(QEvent *event) void BaseWindow::wheelEvent(QWheelEvent *event) { - if (event->orientation() != Qt::Vertical) + if (!event->angleDelta().y()) { return; } if (event->modifiers() & Qt::ControlModifier) { - if (event->delta() > 0) + if (event->angleDelta().y() > 0) { getSettings()->setClampedUiScale( getSettings()->getClampedUiScale() + 0.1); diff --git a/src/widgets/TooltipWidget.cpp b/src/widgets/TooltipWidget.cpp index 6aac584b5..10d680e53 100644 --- a/src/widgets/TooltipWidget.cpp +++ b/src/widgets/TooltipWidget.cpp @@ -4,7 +4,6 @@ #include "singletons/Fonts.hpp" #include -#include #include #include