Advance commontk patch set to PythonQt v4.1.0#98
Draft
hjmjohnson wants to merge 40 commits into
Draft
Conversation
updates: - [github.com/pre-commit/mirrors-clang-format: v22.1.1 → v22.1.2](pre-commit/mirrors-clang-format@v22.1.1...v22.1.2)
Bumps [hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action) from 1.2.20 to 1.2.22. - [Release notes](https://github.com/hendrikmuhs/ccache-action/releases) - [Commits](hendrikmuhs/ccache-action@v1.2.20...v1.2.22) --- updated-dependencies: - dependency-name: hendrikmuhs/ccache-action dependency-version: 1.2.22 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [egor-tensin/cleanup-path](https://github.com/egor-tensin/cleanup-path) from 4 to 5. - [Release notes](https://github.com/egor-tensin/cleanup-path/releases) - [Commits](egor-tensin/cleanup-path@v4...v5) --- updated-dependencies: - dependency-name: egor-tensin/cleanup-path dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
updates: - [github.com/pre-commit/mirrors-clang-format: v22.1.2 → v22.1.3](pre-commit/mirrors-clang-format@v22.1.2...v22.1.3)
updates: - [github.com/pre-commit/mirrors-clang-format: v22.1.3 → v22.1.4](pre-commit/mirrors-clang-format@v22.1.3...v22.1.4)
Bumps [hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action) from 1.2.22 to 1.2.23. - [Release notes](https://github.com/hendrikmuhs/ccache-action/releases) - [Commits](hendrikmuhs/ccache-action@v1.2.22...v1.2.23) --- updated-dependencies: - dependency-name: hendrikmuhs/ccache-action dependency-version: 1.2.23 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
updates: - [github.com/pre-commit/mirrors-clang-format: v22.1.4 → v22.1.5](pre-commit/mirrors-clang-format@v22.1.4...v22.1.5)
Do not skip children of children whose name does not match. Do not bail out if a child is nullptr (not sure if this can occur). Use modern for loop.
Probably happened for template types, which are not handled well by this code model.
(Patch by jamesobutler)
by using windows-2022 (which stands for Windows Server 2022) instead of windows-latest. Otherwise there is a compile error regarding usage of stdext in Qt5; stdext was removed in MSVC 2026.
By checking if an enum member has already been cached it is not required anymore to skip it if is a QFlags. Additionally, the wrapping of QFlags can now be done by using only Q_FLAGS without having a corresponding Q_ENUMS. Cherry-picked from commontk@86068fd
…from commontk/PythonQt fork This commit partially reverts r431 (which removed unsupported files and added documentation) and consolidates consolidates historical changes developed in the `commontk/PythonQt` fork between 2011 and 2021. Summary: * Qt 5support: * Added initial and ongoing support for Qt5, including modules like `PrintSupport`, `QuickWidgets`, `Multimedia`, and `OpenGL`. * Removed Qt4 support; fixed CMake logic for building across Qt 5.3–5.9. * Introduced `pythonqt_wrap_cpp` macro and cleaned up legacy Qt macros. * Build system enhancements: * Re-enabled and expanded CMake support with configurable install paths and testing. * Removed use of `INSTALL_NAME_DIR` to support relocatable installs. * Addressed build issues across toolchains (e.g., MSVC `/bigobj` workaround, debug mode fixes). * Added missing source files and build flags. * Code quality and compatibility: * Replaced deprecated/legacy constructs (e.g., use of `nullptr`, fixed property aliasing with `name` → `objectName`). * Added support for 511 wrappers. * Resolved warnings and linkage issues with optional build flags (e.g., `PythonQt_Wrap_Qtcore`). * Testing and cleanup: * Added cleanup/finalization unit tests. * Ensured test code compiles cleanly when wrapping is partially disabled. (cherry picked from commit MeVisLab/pythonqt@93c546e) Co-authored-by: Florian Link <5535644+florianlink@users.noreply.github.com> Co-authored-by: Matthew Woehlke <matthew.woehlke@kitware.com> Co-authored-by: Max Smolens <max.smolens@kitware.com> Co-authored-by: Pat Marion <james.patrick.marion@gmail.com> Co-authored-by: Francois Budin <francois.budin@kitware.com> Co-authored-by: Christoph Willing <chris.willing@linux.com> Co-authored-by: Stefan Dinkelacker <s.dinkelacker@dkfz-heidelberg.de> Co-authored-by: Sylvain Bernhardt <sylvain.bernhardt@smith-nephew.com>
PythonQt_QtBindings.cpp and PythonQt_QtBindings.h were copied over from the generated_cpp_511 directory. (cherry picked from commit 37b0d31)
…e property This changes the `PYTHONQT_SUPPORT_NAME_PROPERTY` definition from a global `add_definition` to a target-specific compile definition and adds the CMake option `PythonQt_SUPPORT_NAME_PROPERTY` set to ON by default.
…compile property This converts the `PYTHONQT_USE_RELEASE_PYTHON_FALLBACK` definition from a global add_definition to a target-specific compile definition and adds the CMake option `PythonQt_USE_RELEASE_PYTHON_FALLBACK` set to ON by default.
This changes the include directories from global include_directories to target-specific target_include_directories. This improves the encapsulation and modularity of the build.
This changes the PYTHONQT_DEBUG definition from a global add_definition to a target-specific compile definition.
…rgets This simplifies Qt5 integration by using Qt5 imported targets instead of manually including directories and definitions.
… from generated_cpp_5.15 This removes obsolete support for generated_cpp configurations other than 5.15.
The FindPythonLib CMake module is deprecated since CMake 3.12 and starting with CMake 3.27 the module is not provided unless CMP0148 is set to OLD. To integrate PythonQt in other project, the CMake variables `Python3_LIBRARY` and `Python3_INCLUDE_DIR` may be set instead of `PYTHON_LIBRARY`, `PYTHON_INCLUDE_DIR` and `PYTHON_INCLUDE_DIR2`. Options `Python3_ROOT_DIR`, `Python3_LIBRARY_DEBUG` and `Python3_LIBRARY_RELEASE` may also be set. Co-authored-by: Hans Johnson <hans-johnson@uiowa.edu>
…blic macro Introduce `PythonQtConfigure.h` to derive `PYTHONQT_USE_RELEASE_PYTHON_FALLBACK` from the CMake option `PythonQt_USE_RELEASE_PYTHON_FALLBACK`. Export build-tree binary include dir and install the configured header so `#include <PythonQtConfigure.h>` works for both build and install trees. Stop requiring downstreams to set the macro via compile definitions; users can still override by predefining `PYTHONQT_USE_RELEASE_PYTHON_FALLBACK`.
- Leverages automatic execution of MOC and RCC. - Removes obsolete install rules for `build_*.txt` and `typesystem_*.xml`. - Uses "usage requirements" and aligns source lists with `parser/rxx.pro`, `simplecpp/simplecpp.pri`, `generator.pri`, and `generator.pro`.
This removes the use of version-specific Qt variable like `Qt5Core_PRIVATE_INCLUDE_DIRS` and instead relies on CMake’s imported targets for private headers.
…enerator
- Add configurable Qt major version (5 or 6) with sensible default
(Qt6 if Qt6_DIR is defined, otherwise Qt5).
- Require Qt >= 5.15.0 or Qt >= 6.9.0.
- Switch component discovery and linking to `Qt${MAJOR}::...` targets.
- Define QT_VERSION_MAJOR/MINOR from the found package.
- Make pre-generated wrappers default only for Qt5 (generated_cpp_515);
for Qt6, default to unset (wrappers must be generated).
This simplifies the mapping of Qt wrapped libraries to their components by removing the redundant version-specific prefix 'qt5' from variable names.
This updates the mapping of Qt wrapped libraries to components to support Qt6. Additional dependencies for certain components are included when PythonQt_QT_VERSION is 6.
…changes Partially reverts dd82ba4 ("[commontk] cmake: Simplify build-system leveraging AUTOMOC capability", 2025-10-23) to fix a build error reported when AUTOMOC merges all `moc_*.cpp` into one Translation Unit (TU) (`<target>_autogen/mocs_compilation*.cpp`). This change includes: - Reverting to manual specification of moc sources. - Disabling AUTOMOC for specified sources to avoid QMetaTypeId specialization conflicts. This fixes the following error: ``` In file included from /path/to/Support/Qt/6.9.1/gcc_64/include/QtCore/qvariant.h:10, from /path/to/Support/Qt/6.9.1/gcc_64/include/QtCore/qmetaobject.h:10, from /path/to/Support/Qt/6.9.1/gcc_64/include/QtCore/QMetaMethod:1, from /path/to/Projects/PythonQt-CTK/src/PythonQtUtils.h:49, from /path/to/Projects/PythonQt-CTK/src/PythonQt.h:46, from /path/to/Projects/PythonQt-CTK-cmake-Qt6-Release/PythonQt_autogen/CRAGYDUSE3/../../../CTK-Qt6-build/PythonQtGenerator-output-6.9.1/generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core0.h:1, from /path/to/Projects/PythonQt-CTK-cmake-Qt6-Release/PythonQt_autogen/CRAGYDUSE3/moc_com_trolltech_qt_core0.cpp:9, from /path/to/Projects/PythonQt-CTK-cmake-Qt6-Release/PythonQt_autogen/mocs_compilation.cpp:2: /path/to/Support/Qt/6.9.1/gcc_64/include/QtPrintSupport/qprintengine.h:12:1: error: specialization of ‘QMetaTypeId<QMarginsF>’ after instantiation 12 | Q_DECLARE_METATYPE(QMarginsF) | ^~~~~~~~~~~~~~~~~~ /path/to/Support/Qt/6.9.1/gcc_64/include/QtPrintSupport/qprintengine.h:12:1: error: redefinition of ‘struct QMetaTypeId<QMarginsF>’ /path/to/Support/Qt/6.9.1/gcc_64/include/QtCore/qmetatype.h:1232:8: note: previous definition of ‘struct QMetaTypeId<QMarginsF>’ ```
… 24.04 This changes the minimum required Qt6 version from 6.9.0 to 6.4.0 to ensure compatibility with Ubuntu 24.04, which ships with Qt 6.4.2.
Since XmlPatterns was removed in Qt 6, it should not be considered. See https://doc.qt.io/qt-6/whatsnew60.html#removed-modules-in-qt-6-0
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Advance the commontk PythonQt patch set from the v4.0.1 base to v4.1.0 (MeVisLab
v4.1.0= upstreammain,9992368e). The 28[commontk]CMake/Qt6 maintenance commits are replayed unchanged on top of the newer tag, so this branch carries the v4.1.0 improvements (Qt 6.11 type-system adaptations,findChild/findChildrenfix, MSVC-2022 restriction, CI bumps) while keeping the fork's CMake build, Qt6 support, andfind_package(Python3)modernization.Base:
patched-v4.0.1-2026-03-16-5cd9b581f→ Head:patched-v4.1.0-2026-06-05-9992368e.How this branch was produced
5cd9b581is the last pre-[commontk]commit; it (and the two other base commits923b8cbd,6a426db0) are already contained inv4.1.0, so only the 28[commontk]patches are replayed. The rebase applied all 28 with zero conflicts.Net diff vs. the v4.0.1-based patched branch
The only tree differences between this branch and
patched-v4.0.1-2026-03-16-5cd9b581fare the v4.1.0-over-v4.0.1 upstream deltas:generator/typesystem_core.xml,typesystem_gui.xml,typesystem_sql.xml— Qt 6.11 type-system adaptationsgenerator/parser/codemodel.cpp— prevent endless recursion on self-named typedefsrc/PythonQtStdDecorators.{h,cpp}—findChild/findChildrenlogic fix.github/workflows/*,.pre-commit-config.yaml— CI / pre-commit bumps