Skip to content

Commit

Permalink
Merge pull request #3 from LIHPC-Computational-Geometry/qt6port
Browse files Browse the repository at this point in the history
Version 6.3.0. Porting Qt6.
  • Loading branch information
CharlesPignerol authored Dec 13, 2023
2 parents f399b00 + 1e7ffb6 commit 0359e83
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 46 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.15)

project (Preferences CXX)

Expand Down
1 change: 0 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})


4 changes: 0 additions & 4 deletions src/CfgEditor/CfgEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
#include "PrefsXerces/XMLLoader.h"
#include <TkUtil/Exception.h>

#ifndef QT_5
#include <QtGui/QApplication>
#else // QT_5
#include <QApplication>
#endif // QT_5

#include <iostream>
#include <stdexcept>
Expand Down
4 changes: 0 additions & 4 deletions src/CfgUpdater/CfgUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
#include <QtUtil/QtUnicodeHelper.h>
#include <TkUtil/Exception.h>

#ifndef QT_5
#include <QtGui/QApplication>
#else // QT_5
#include <QApplication>
#endif // QT_5

#include <iostream>
#include <stdexcept>
Expand Down
3 changes: 2 additions & 1 deletion src/PrefsQt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 4 additions & 8 deletions src/PrefsQt/QtPreferencesDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,11 @@

#include <QFileInfo>
#include <QCursor>
#ifndef QT_5
#include <QtGui/QLayout>
#include <QtGui/QMessageBox>
#include <QtGui/QFileDialog>
#include <QtGui/QApplication>
#include <QtGui/QLabel>
#else // QT_5
#include <QLayout>
#include <QMessageBox>
#include <QFileDialog>
#include <QApplication>
#include <QLabel>
#endif // QT_5
#include <QtUtil/CharToLatinQString.h>

#include <memory>
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions src/PrefsQt/QtPreferencesPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,10 @@
#include <QtUtil/QtMessageBox.h>

#include <QCursor>
#ifndef QT_5
#include <QtGui/QApplication>
#include <QtGui/QInputDialog>
#include <QtGui/QMessageBox>
#include <QtGui/QLineEdit>
#else // QT_5
#include <QApplication>
#include <QInputDialog>
#include <QMessageBox>
#include <QLineEdit>
#endif // QT_5

#include <assert.h>
#include <memory>
Expand Down
7 changes: 0 additions & 7 deletions src/PrefsQt/public/PrefsQt/QtPreferencesDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@
#include <PrefsCore/prefs_config.h>
#include <PrefsQt/QtPreferencesPanel.h>

#ifndef QT_5
#include <QtGui/QDialog>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QStatusBar>
#else // QT_5
#include <QDialog>
#include <QMenu>
#include <QMenuBar>
#include <QStatusBar>
#endif // QT_5

#include <string>

Expand Down
4 changes: 0 additions & 4 deletions src/PrefsQt/public/PrefsQt/QtPreferencesPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
#include <PrefsCore/Section.h>

// MOC_SKIP_BEGIN
#ifndef QT_5
#include <QtGui/QTreeWidget>
#else // QT_5
#include <QTreeWidget>
#endif // QT_5
// MOC_SKIP_END

#include <string>
Expand Down
4 changes: 0 additions & 4 deletions src/PrefsQt/public/PrefsQt/QtPrefsListViewItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
#include <string>

#include <QValidator>
#ifndef QT_5
#include <QtGui/QTreeWidget>
#else // QT_5
#include <QTreeWidget>
#endif // QT_5


class QtPrefsSectionListViewItem;
Expand Down
6 changes: 6 additions & 0 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -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
===============

Expand Down

0 comments on commit 0359e83

Please sign in to comment.