From 7206d11b23007fb8f6a23137f3db5ac5bfb80df0 Mon Sep 17 00:00:00 2001
From: Alberto Nidasio <nidasioalberto@gmail.com>
Date: Sun, 4 Aug 2024 11:21:38 +0200
Subject: [PATCH] [CMake] Updated C++ version from 11 to 17

Also edited QCustomPlot.cpp to avoid Qt deprectation warning on an enum.
---
 CMakeLists.txt                              |  2 +-
 src/shared/Core/QCustomPlot/QCustomPlot.cpp | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f947e68..9b061d2e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.16)
 
 project(SkywardHub)
 
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 
 # MAvLink Skyward library
diff --git a/src/shared/Core/QCustomPlot/QCustomPlot.cpp b/src/shared/Core/QCustomPlot/QCustomPlot.cpp
index 44e767d1..0ad2a304 100644
--- a/src/shared/Core/QCustomPlot/QCustomPlot.cpp
+++ b/src/shared/Core/QCustomPlot/QCustomPlot.cpp
@@ -697,7 +697,7 @@ QCPPainter *QCPPaintBufferPixmap::startPainting()
 {
     QCPPainter *result = new QCPPainter(&mBuffer);
 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-    result->setRenderHint(QPainter::HighQualityAntialiasing);
+    result->setRenderHint(QPainter::Antialiasing);
 #endif
     return result;
 }
@@ -791,7 +791,7 @@ QCPPainter *QCPPaintBufferGlPbuffer::startPainting()
     }
 
     QCPPainter *result = new QCPPainter(mGlPBuffer);
-    result->setRenderHint(QPainter::HighQualityAntialiasing);
+    result->setRenderHint(QPainter::Antialiasing);
     return result;
 }
 
@@ -914,7 +914,7 @@ QCPPainter *QCPPaintBufferGlFbo::startPainting()
     mGlFrameBuffer->bind();
     QCPPainter *result = new QCPPainter(paintDevice.data());
 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-    result->setRenderHint(QPainter::HighQualityAntialiasing);
+    result->setRenderHint(QPainter::Antialiasing);
 #endif
     return result;
 }
@@ -17294,9 +17294,9 @@ void QCustomPlot::paintEvent(QPaintEvent *event)
     {
 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
         painter.setRenderHint(
-            QPainter::HighQualityAntialiasing);  // to make Antialiasing look
-                                                 // good if using the OpenGL
-                                                 // graphicssystem
+            QPainter::Antialiasing);  // to make Antialiasing look
+                                      // good if using the OpenGL
+                                      // graphicssystem
 #endif
         if (mBackgroundBrush.style() != Qt::NoBrush)
             painter.fillRect(mViewport, mBackgroundBrush);
-- 
GitLab