From ff48a155f9646b8c3f77b8b58c6d617bc369f0c8 Mon Sep 17 00:00:00 2001 From: HaHeho Date: Thu, 21 Dec 2023 17:38:23 +0100 Subject: [PATCH 1/2] Silence OpenGL deprecation warnings during build --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 2e2f2bfa..346fcba1 100644 --- a/configure.ac +++ b/configure.ac @@ -685,6 +685,9 @@ AS_IF([test x$have_warnings = xyes], WARNING_FLAGS="$WARNING_FLAGS -Woverloaded-virtual -Wnon-virtual-dtor" WARNING_FLAGS="$WARNING_FLAGS -Wwrite-strings" + dnl instead of -Wno-deprecated-declarations to silence OpenGL deprecation warnings + WARNING_FLAGS="$WARNING_FLAGS -DGL_SILENCE_DEPRECATION" + dnl -Wall sets -Wstrict-overflow=1, we set it to 0: WARNING_FLAGS="$WARNING_FLAGS -Wstrict-overflow=0" From 1de91a4e7ba949adbef22d02420734de7665a37b Mon Sep 17 00:00:00 2001 From: HaHeho Date: Thu, 21 Dec 2023 17:56:44 +0100 Subject: [PATCH 2/2] Replace Qt QWheelEvent obsolte `delta()` with `angleDelta()` --- src/gui/quserinterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/quserinterface.cpp b/src/gui/quserinterface.cpp index b992b19c..03b12020 100644 --- a/src/gui/quserinterface.cpp +++ b/src/gui/quserinterface.cpp @@ -1230,8 +1230,9 @@ void ssr::QUserInterface::wheelEvent(QWheelEvent *event) event->accept(); // update zoom + int delta = event->angleDelta().y(); _set_zoom(static_cast(_zoom_factor/STDZOOMFACTOR * - (100.0f+event->delta()/100.f*5.0f) + 0.5f)); + (100.0f+delta/100.f*5.0f) + 0.5f)); } /** Handles Qt drag & drop events.