Skip to content

Commit 0359e83

Browse files
Merge pull request #3 from LIHPC-Computational-Geometry/qt6port
Version 6.3.0. Porting Qt6.
2 parents f399b00 + 1e7ffb6 commit 0359e83

File tree

13 files changed

+18
-46
lines changed

13 files changed

+18
-46
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.12)
1+
cmake_minimum_required(VERSION 3.15)
22

33
project (Preferences CXX)
44

CMakePresets.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
{
55
"name": "ci",
66
"cacheVariables": {
7-
"GUIToolkitsVariables_ROOT": "$env{INSTALL_DIR}/guitoolkitsvariables",
87
"TkUtil_ROOT": "$env{INSTALL_DIR}/tkutil",
98
"QtUtil_ROOT": "$env{INSTALL_DIR}/qtutil"
109
}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# preferences
22

3-
![spack-ci](https://github.com/LIHPC-Computational-Geometry/preferences/actions/workflows/spack-ci.yml/badge.svg)
4-
53
Library of user preference management utilities based on [XercesC](https://xerces.apache.org/xerces-c/) and [Qt](https://www.qt.io/).
64

7-
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).
5+
This project is a dependency of the [mgx](https://github.com/LIHPC-Computational-Geometry/mgx) product.
6+
7+
Its Spack and Cmake CIs are based on reusable workflows provided in [lihpccg-ci](https://github.com/LIHPC-Computational-Geometry/lihpccg-ci) project.

cmake/version.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44

55
set (PREFERENCES_MAJOR_VERSION "6")
6-
set (PREFERENCES_MINOR_VERSION "2")
7-
set (PREFERENCES_RELEASE_VERSION "2")
6+
set (PREFERENCES_MINOR_VERSION "3")
7+
set (PREFERENCES_RELEASE_VERSION "0")
88
set (PREFERENCES_VERSION ${PREFERENCES_MAJOR_VERSION}.${PREFERENCES_MINOR_VERSION}.${PREFERENCES_RELEASE_VERSION})
99

1010

src/CfgEditor/CfgEdit.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
#include "PrefsXerces/XMLLoader.h"
33
#include <TkUtil/Exception.h>
44

5-
#ifndef QT_5
6-
#include <QtGui/QApplication>
7-
#else // QT_5
85
#include <QApplication>
9-
#endif // QT_5
106

117
#include <iostream>
128
#include <stdexcept>

src/CfgUpdater/CfgUpdate.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
#include <QtUtil/QtUnicodeHelper.h>
44
#include <TkUtil/Exception.h>
55

6-
#ifndef QT_5
7-
#include <QtGui/QApplication>
8-
#else // QT_5
96
#include <QApplication>
10-
#endif // QT_5
117

128
#include <iostream>
139
#include <stdexcept>

src/PrefsQt/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ find_package (GUIToolkitsVariables)
55

66
include (${CMAKE_SOURCE_DIR}/cmake/version.cmake)
77
include (${GUIToolkitsVariables_CMAKE_DIR}/common.cmake)
8+
include (${GUIToolkitsVariables_CMAKE_DIR}/common_qt.cmake) # QT_MAJOR
89
include (${GUIToolkitsVariables_CMAKE_DIR}/workarounds.cmake)
910

1011
find_package (QtUtil 6 REQUIRED)
11-
find_package(Qt5Core 5 NO_CMAKE_SYSTEM_PATH) # In order to enable moc ...
12+
find_package(Qt${QT_MAJOR}Core ${QT_MAJOR} NO_CMAKE_SYSTEM_PATH) # In order to enable moc ...
1213

1314
file (GLOB HEADERS public/${CURRENT_PACKAGE_NAME}/*.h)
1415
file (GLOB CPP_SOURCES *.cpp)

src/PrefsQt/QtPreferencesDialog.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,11 @@
88

99
#include <QFileInfo>
1010
#include <QCursor>
11-
#ifndef QT_5
12-
#include <QtGui/QLayout>
13-
#include <QtGui/QMessageBox>
14-
#include <QtGui/QFileDialog>
15-
#include <QtGui/QApplication>
16-
#include <QtGui/QLabel>
17-
#else // QT_5
1811
#include <QLayout>
1912
#include <QMessageBox>
2013
#include <QFileDialog>
2114
#include <QApplication>
2215
#include <QLabel>
23-
#endif // QT_5
2416
#include <QtUtil/CharToLatinQString.h>
2517

2618
#include <memory>
@@ -51,7 +43,11 @@ QtPreferencesDialog::QtPreferencesDialog (
5143
setModal (modal);
5244

5345
QVBoxLayout* layout = new QVBoxLayout (this);
46+
#ifdef QT_5
5447
layout->setMargin (10);
48+
#else // => Qt6
49+
layout->setContentsMargins (10, 10, 10, 10);
50+
#endif // QT_5
5551
layout->setSpacing (10);
5652
layout->setSizeConstraint (QLayout::SetMinimumSize);
5753
_menuBar = createMenu (editable, withApply);

src/PrefsQt/QtPreferencesPanel.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,10 @@
1414
#include <QtUtil/QtMessageBox.h>
1515

1616
#include <QCursor>
17-
#ifndef QT_5
18-
#include <QtGui/QApplication>
19-
#include <QtGui/QInputDialog>
20-
#include <QtGui/QMessageBox>
21-
#include <QtGui/QLineEdit>
22-
#else // QT_5
2317
#include <QApplication>
2418
#include <QInputDialog>
2519
#include <QMessageBox>
2620
#include <QLineEdit>
27-
#endif // QT_5
2821

2922
#include <assert.h>
3023
#include <memory>

src/PrefsQt/public/PrefsQt/QtPreferencesDialog.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@
44
#include <PrefsCore/prefs_config.h>
55
#include <PrefsQt/QtPreferencesPanel.h>
66

7-
#ifndef QT_5
8-
#include <QtGui/QDialog>
9-
#include <QtGui/QMenu>
10-
#include <QtGui/QMenuBar>
11-
#include <QtGui/QStatusBar>
12-
#else // QT_5
137
#include <QDialog>
148
#include <QMenu>
159
#include <QMenuBar>
1610
#include <QStatusBar>
17-
#endif // QT_5
1811

1912
#include <string>
2013

0 commit comments

Comments
 (0)