From 1e7ffb68c6817ecaa02fbc294e63022596872eb7 Mon Sep 17 00:00:00 2001 From: Charles PIGNEROL <> Date: Wed, 13 Dec 2023 16:38:43 +0100 Subject: [PATCH] Version 6.3.0. Porting Qt6. --- CMakeLists.txt | 2 +- CMakePresets.json | 1 - README.md | 6 +++--- cmake/version.cmake | 4 ++-- src/CfgEditor/CfgEdit.cpp | 4 ---- src/CfgUpdater/CfgUpdate.cpp | 4 ---- src/PrefsQt/CMakeLists.txt | 3 ++- src/PrefsQt/QtPreferencesDialog.cpp | 12 ++++-------- src/PrefsQt/QtPreferencesPanel.cpp | 7 ------- src/PrefsQt/public/PrefsQt/QtPreferencesDialog.h | 7 ------- src/PrefsQt/public/PrefsQt/QtPreferencesPanel.h | 4 ---- src/PrefsQt/public/PrefsQt/QtPrefsListViewItem.h | 4 ---- versions.txt | 6 ++++++ 13 files changed, 18 insertions(+), 46 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5153550..064dfc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.15) project (Preferences CXX) diff --git a/CMakePresets.json b/CMakePresets.json index 91f6b65..72e44f1 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -4,7 +4,6 @@ { "name": "ci", "cacheVariables": { - "GUIToolkitsVariables_ROOT": "$env{INSTALL_DIR}/guitoolkitsvariables", "TkUtil_ROOT": "$env{INSTALL_DIR}/tkutil", "QtUtil_ROOT": "$env{INSTALL_DIR}/qtutil" } diff --git a/README.md b/README.md index 1a9f22b..a16899d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # preferences -![spack-ci](https://github.com/LIHPC-Computational-Geometry/preferences/actions/workflows/spack-ci.yml/badge.svg) - Library of user preference management utilities based on [XercesC](https://xerces.apache.org/xerces-c/) and [Qt](https://www.qt.io/). -This project is part of the [magix3d](https://github.com/LIHPC-Computational-Geometry/magix3d) ecosystem and conforms to its [CI policy](https://github.com/LIHPC-Computational-Geometry/spack_recipes#development-in-magix3d-ecosystem-projects). +This project is a dependency of the [mgx](https://github.com/LIHPC-Computational-Geometry/mgx) product. + +Its Spack and Cmake CIs are based on reusable workflows provided in [lihpccg-ci](https://github.com/LIHPC-Computational-Geometry/lihpccg-ci) project. diff --git a/cmake/version.cmake b/cmake/version.cmake index cca8d31..af5b1e5 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -3,8 +3,8 @@ # set (PREFERENCES_MAJOR_VERSION "6") -set (PREFERENCES_MINOR_VERSION "2") -set (PREFERENCES_RELEASE_VERSION "2") +set (PREFERENCES_MINOR_VERSION "3") +set (PREFERENCES_RELEASE_VERSION "0") set (PREFERENCES_VERSION ${PREFERENCES_MAJOR_VERSION}.${PREFERENCES_MINOR_VERSION}.${PREFERENCES_RELEASE_VERSION}) diff --git a/src/CfgEditor/CfgEdit.cpp b/src/CfgEditor/CfgEdit.cpp index c68b328..f9fad39 100644 --- a/src/CfgEditor/CfgEdit.cpp +++ b/src/CfgEditor/CfgEdit.cpp @@ -2,11 +2,7 @@ #include "PrefsXerces/XMLLoader.h" #include -#ifndef QT_5 -#include -#else // QT_5 #include -#endif // QT_5 #include #include diff --git a/src/CfgUpdater/CfgUpdate.cpp b/src/CfgUpdater/CfgUpdate.cpp index 897d165..ebd247b 100644 --- a/src/CfgUpdater/CfgUpdate.cpp +++ b/src/CfgUpdater/CfgUpdate.cpp @@ -3,11 +3,7 @@ #include #include -#ifndef QT_5 -#include -#else // QT_5 #include -#endif // QT_5 #include #include diff --git a/src/PrefsQt/CMakeLists.txt b/src/PrefsQt/CMakeLists.txt index 635e028..ff402dc 100644 --- a/src/PrefsQt/CMakeLists.txt +++ b/src/PrefsQt/CMakeLists.txt @@ -5,10 +5,11 @@ find_package (GUIToolkitsVariables) include (${CMAKE_SOURCE_DIR}/cmake/version.cmake) include (${GUIToolkitsVariables_CMAKE_DIR}/common.cmake) +include (${GUIToolkitsVariables_CMAKE_DIR}/common_qt.cmake) # QT_MAJOR include (${GUIToolkitsVariables_CMAKE_DIR}/workarounds.cmake) find_package (QtUtil 6 REQUIRED) -find_package(Qt5Core 5 NO_CMAKE_SYSTEM_PATH) # In order to enable moc ... +find_package(Qt${QT_MAJOR}Core ${QT_MAJOR} NO_CMAKE_SYSTEM_PATH) # In order to enable moc ... file (GLOB HEADERS public/${CURRENT_PACKAGE_NAME}/*.h) file (GLOB CPP_SOURCES *.cpp) diff --git a/src/PrefsQt/QtPreferencesDialog.cpp b/src/PrefsQt/QtPreferencesDialog.cpp index 8e60d28..68b2a2c 100644 --- a/src/PrefsQt/QtPreferencesDialog.cpp +++ b/src/PrefsQt/QtPreferencesDialog.cpp @@ -8,19 +8,11 @@ #include #include -#ifndef QT_5 -#include -#include -#include -#include -#include -#else // QT_5 #include #include #include #include #include -#endif // QT_5 #include #include @@ -51,7 +43,11 @@ QtPreferencesDialog::QtPreferencesDialog ( setModal (modal); QVBoxLayout* layout = new QVBoxLayout (this); +#ifdef QT_5 layout->setMargin (10); +#else // => Qt6 + layout->setContentsMargins (10, 10, 10, 10); +#endif // QT_5 layout->setSpacing (10); layout->setSizeConstraint (QLayout::SetMinimumSize); _menuBar = createMenu (editable, withApply); diff --git a/src/PrefsQt/QtPreferencesPanel.cpp b/src/PrefsQt/QtPreferencesPanel.cpp index 2e35068..e24a1ca 100644 --- a/src/PrefsQt/QtPreferencesPanel.cpp +++ b/src/PrefsQt/QtPreferencesPanel.cpp @@ -14,17 +14,10 @@ #include #include -#ifndef QT_5 -#include -#include -#include -#include -#else // QT_5 #include #include #include #include -#endif // QT_5 #include #include diff --git a/src/PrefsQt/public/PrefsQt/QtPreferencesDialog.h b/src/PrefsQt/public/PrefsQt/QtPreferencesDialog.h index eac543e..a695cd9 100644 --- a/src/PrefsQt/public/PrefsQt/QtPreferencesDialog.h +++ b/src/PrefsQt/public/PrefsQt/QtPreferencesDialog.h @@ -4,17 +4,10 @@ #include #include -#ifndef QT_5 -#include -#include -#include -#include -#else // QT_5 #include #include #include #include -#endif // QT_5 #include diff --git a/src/PrefsQt/public/PrefsQt/QtPreferencesPanel.h b/src/PrefsQt/public/PrefsQt/QtPreferencesPanel.h index 043626b..f3387de 100644 --- a/src/PrefsQt/public/PrefsQt/QtPreferencesPanel.h +++ b/src/PrefsQt/public/PrefsQt/QtPreferencesPanel.h @@ -5,11 +5,7 @@ #include // MOC_SKIP_BEGIN -#ifndef QT_5 -#include -#else // QT_5 #include -#endif // QT_5 // MOC_SKIP_END #include diff --git a/src/PrefsQt/public/PrefsQt/QtPrefsListViewItem.h b/src/PrefsQt/public/PrefsQt/QtPrefsListViewItem.h index 215fe6f..ff3b4ed 100644 --- a/src/PrefsQt/public/PrefsQt/QtPrefsListViewItem.h +++ b/src/PrefsQt/public/PrefsQt/QtPrefsListViewItem.h @@ -7,11 +7,7 @@ #include #include -#ifndef QT_5 -#include -#else // QT_5 #include -#endif // QT_5 class QtPrefsSectionListViewItem; diff --git a/versions.txt b/versions.txt index 3a8f3c5..3310181 100644 --- a/versions.txt +++ b/versions.txt @@ -1,3 +1,9 @@ +Version 6.3.0 : 13/12/23 +=============== + +Portage Qt 6/GUIToolkitsVariables v 1.4.0/QtUtil v 6.4.0. + + Version 6.2.1 : 23/06/23 ===============