From 55b164deb213241b8fb7ceb09544f19d0487c21b Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 13 Oct 2024 22:58:55 +0300
Subject: [PATCH 38/38] Qt6x: Make Qt-6.7 the minimum requirement

See RM #959

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/gui-qt/chatline.cpp |  4 ----
 client/gui-qt/citydlg.cpp  | 10 ----------
 client/gui-qt/gotodlg.cpp  |  5 -----
 client/gui-qt/pages.cpp    |  5 -----
 m4/qt.m4                   |  2 +-
 meson.build                |  8 ++++----
 6 files changed, 5 insertions(+), 29 deletions(-)

diff --git a/client/gui-qt/chatline.cpp b/client/gui-qt/chatline.cpp
index 14b494848e..95bf2b2d1c 100644
--- a/client/gui-qt/chatline.cpp
+++ b/client/gui-qt/chatline.cpp
@@ -301,11 +301,7 @@ chatwdg::chatwdg(QWidget *parent)
           this, &chatwdg::toggle_size);
   connect(remove_links, &QAbstractButton::clicked, this, &chatwdg::rm_links);
 #ifdef FC_QT6X_MODE
-#if QT_VERSION >= 0x060700
   connect(cb, &QCheckBox::checkStateChanged, this, &chatwdg::state_changed);
-#else  // QT >= 6.7
-  connect(cb, &QCheckBox::stateChanged, this, &chatwdg::state_changed_depr);
-#endif // QT >= 6.7
 #else  // FC_QT6X_MODE
   connect(cb, &QCheckBox::stateChanged, this, &chatwdg::state_changed_depr);
 #endif // FC_QT6X_MODE
diff --git a/client/gui-qt/citydlg.cpp b/client/gui-qt/citydlg.cpp
index 120a86cc4d..1aa18f265a 100644
--- a/client/gui-qt/citydlg.cpp
+++ b/client/gui-qt/citydlg.cpp
@@ -1947,13 +1947,8 @@ city_dialog::city_dialog(QWidget *parent): qfc_dialog(parent)
       cma_celeb_checkbox = new QCheckBox;
       slider_grid->addWidget(cma_celeb_checkbox, i + 1, 2 , 1 , 1);
 #ifdef FC_QT6X_MODE
-#if QT_VERSION >= 0x060700
       connect(cma_celeb_checkbox,
               &QCheckBox::checkStateChanged, this, &city_dialog::cma_toggle_changed);
-#else  // QT >= 6.7
-      connect(cma_celeb_checkbox,
-              &QCheckBox::stateChanged, this, &city_dialog::cma_toggle_changed_depr);
-#endif // QT >= 6.7
 #else  // FC_QT6X_MODE
       connect(cma_celeb_checkbox,
               &QCheckBox::stateChanged, this, &city_dialog::cma_toggle_changed_depr);
@@ -1964,13 +1959,8 @@ city_dialog::city_dialog(QWidget *parent): qfc_dialog(parent)
       cma_max_growth = new QCheckBox;
       slider_grid->addWidget(cma_max_growth, i + 1, 2 , 1 , 1);
 #ifdef FC_QT6X_MODE
-#if QT_VERSION >= 0x060700
       connect(cma_max_growth,
               &QCheckBox::checkStateChanged, this, &city_dialog::cma_toggle_changed);
-#else  // QT >= 6.7
-      connect(cma_max_growth,
-              &QCheckBox::stateChanged, this, &city_dialog::cma_toggle_changed_depr);
-#endif // QT >= 6.7
 #else  // FC_QT6X_MODE
       connect(cma_max_growth,
               &QCheckBox::stateChanged, this, &city_dialog::cma_toggle_changed_depr);
diff --git a/client/gui-qt/gotodlg.cpp b/client/gui-qt/gotodlg.cpp
index ffeeae7b40..6df0916db6 100644
--- a/client/gui-qt/gotodlg.cpp
+++ b/client/gui-qt/gotodlg.cpp
@@ -122,13 +122,8 @@ goto_dialog::goto_dialog(QWidget *parent): qfc_dialog(parent)
   connect(goto_city, &QAbstractButton::clicked, this, &goto_dialog::go_to_city);
   connect(airlift_city, &QAbstractButton::clicked, this, &goto_dialog::airlift_to);
 #ifdef FC_QT6X_MODE
-#if QT_VERSION >= 0x060700
   connect(show_all, &QCheckBox::checkStateChanged,
           this, &goto_dialog::checkbox_changed);
-#else  // QT >= 6.7
-  connect(show_all, &QCheckBox::stateChanged,
-          this, &goto_dialog::checkbox_changed_depr);
-#endif // QT >= 6.7
 #else  // FC_QT6X_MODE
   connect(show_all, &QCheckBox::stateChanged,
           this, &goto_dialog::checkbox_changed_depr);
diff --git a/client/gui-qt/pages.cpp b/client/gui-qt/pages.cpp
index 496efb79af..d2fb8ffc9d 100644
--- a/client/gui-qt/pages.cpp
+++ b/client/gui-qt/pages.cpp
@@ -543,13 +543,8 @@ void fc_client::create_load_page()
           &QItemSelectionModel::selectionChanged, this,
           &fc_client::slot_selection_changed);
 #ifdef FC_QT6X_MODE
-#if QT_VERSION >= 0x060700
   connect(show_preview, &QCheckBox::checkStateChanged, this,
           &fc_client::state_preview);
-#else  // QT >= 6.7
-  connect(show_preview, &QCheckBox::stateChanged, this,
-          &fc_client::state_preview_depr);
-#endif // QT >= 6.7
 #else  // FC_QT6X_MODE
   connect(show_preview, &QCheckBox::stateChanged, this,
           &fc_client::state_preview_depr);
diff --git a/m4/qt.m4 b/m4/qt.m4
index c95f7f12ae..4dcec96988 100644
--- a/m4/qt.m4
+++ b/m4/qt.m4
@@ -8,7 +8,7 @@ AC_DEFUN([FC_QT],
       FC_QT_CXXFLAGS="$FC_QT6_CXXFLAGS"
       FC_QT_LIBS="$FC_QT6_LIBS"
       fc_qt_usable="$fc_qt6_usable" ;;
-    xqt6x|xQt6x) FC_QT6([0x060600], [6.6])
+    xqt6x|xQt6x) FC_QT6([0x060700], [6.7])
       FC_QT_CPPFLAGS="$FC_QT6_CPPFLAGS"
       FC_QT_CXXFLAGS="$FC_QT6_CXXFLAGS"
       FC_QT_LIBS="$FC_QT6_LIBS"
diff --git a/meson.build b/meson.build
index 426d1e4280..002565ccb2 100644
--- a/meson.build
+++ b/meson.build
@@ -903,7 +903,7 @@ if qtver == 'qt5'
   qt_opts = []
   qt_cppflags = '-fPIC'
 elif qtver == 'qt6x'
-  qt_minver='0x060600'
+  qt_minver='0x060700'
   add_global_arguments('-DQT_DISABLE_DEPRECATED_BEFORE=' + qt_minver, language : 'cpp')
   priv_conf_data.set('FC_QT6X_MODE', 1)
   qt_opts = 'cpp_std=c++17'
@@ -3592,7 +3592,7 @@ if not qtfine
   if qtver == 'qt6'
     error('Qt6 >= 6.0 required for qt-client in Qt6 mode, but not found')
   elif qtver == 'qt6x'
-    error('Qt6 >= 6.6 required for qt-client in Qt6x mode, but not found')
+    error('Qt6 >= 6.7 required for qt-client in Qt6x mode, but not found')
   else
     error('Qt5 >= 5.15 required for qt-client in Qt5 mode, but not found')
   endif
@@ -4290,7 +4290,7 @@ if not qtfine
   if qtver == 'qt6'
     error('Qt6 >= 6.0 required for qt-modpack-installer in Qt6 mode, but not found')
   elif qtver == 'qt6x'
-    error('Qt6 >= 6.6 required for qt-modpack-installer in Qt6x mode, but not found')
+    error('Qt6 >= 6.7 required for qt-modpack-installer in Qt6x mode, but not found')
   else
     error('Qt5 >= 5.15 required for qt-modpack-installer in Qt5 mode, but not found')
   endif
@@ -4379,7 +4379,7 @@ if not qtfine
   if qtver == 'qt6'
     error('Qt6 >= 6.0 required for ruledit in Qt6 mode, but not found')
   elif qtver == 'qt6x'
-    error('Qt6 >= 6.6 required for ruledit in Qt6x mode, but not found')
+    error('Qt6 >= 6.7 required for ruledit in Qt6x mode, but not found')
   else
     error('Qt5 >= 5.15 required for ruledit in Qt5 mode, but not found')
   endif
-- 
2.45.2

