From 0649923ad351f434dd9689e7ebd49e82b47b47dc Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 13 Oct 2023 16:06:44 +0200 Subject: Fix Unity build of QtGui qtextframe_iterator_wrapper.cpp and qtextblock_iterator_wrapper.cpp have static helper functions named "iterator_..." that might clash when the order changes due further sources being added. Amends 277783b47e704505f19d00dd80f26239082974d6. Pick-to: 6.5 Task-number: PYSIDE-2155 Change-Id: Ib545b8a08be400b9243a0a1d85827e2e97782666 Reviewed-by: Cristian Maureira-Fredes (cherry picked from commit 008d557918cc9931ae5b43718bd7072b10d1e326) Reviewed-by: Qt Cherry-pick Bot --- sources/pyside6/PySide6/QtGui/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sources/pyside6/PySide6/QtGui/CMakeLists.txt b/sources/pyside6/PySide6/QtGui/CMakeLists.txt index 7692a0034..1ab50cd8c 100644 --- a/sources/pyside6/PySide6/QtGui/CMakeLists.txt +++ b/sources/pyside6/PySide6/QtGui/CMakeLists.txt @@ -7,7 +7,17 @@ qt_wrap_cpp(QPYTEXTOBJECT_MOC "${pyside6_SOURCE_DIR}/qpytextobject.h") set(QtGui_DROPPED_ENTRIES) +# Exclude sources that have clashing static helper functions named "iterator_..." +set(QtGui_SRC_UNITY_EXCLUDED_SRC + ${QtGui_GEN_DIR}/qtextframe_iterator_wrapper.cpp + ${QtGui_GEN_DIR}/qtextblock_iterator_wrapper.cpp +) + +set_property(SOURCE ${QtGui_SRC_UNITY_EXCLUDED_SRC} + PROPERTY SKIP_UNITY_BUILD_INCLUSION ON) + set(QtGui_SRC +${QtGui_SRC_UNITY_EXCLUDED_SRC} ${QtGui_GEN_DIR}/qabstractfileiconprovider_wrapper.cpp ${QtGui_GEN_DIR}/qabstracttextdocumentlayout_paintcontext_wrapper.cpp ${QtGui_GEN_DIR}/qabstracttextdocumentlayout_selection_wrapper.cpp @@ -160,7 +170,6 @@ ${QtGui_GEN_DIR}/qsurface_wrapper.cpp ${QtGui_GEN_DIR}/qsurfaceformat_wrapper.cpp ${QtGui_GEN_DIR}/qsyntaxhighlighter_wrapper.cpp ${QtGui_GEN_DIR}/qtabletevent_wrapper.cpp -${QtGui_GEN_DIR}/qtextblock_iterator_wrapper.cpp ${QtGui_GEN_DIR}/qtextblock_wrapper.cpp ${QtGui_GEN_DIR}/qtextblockformat_wrapper.cpp ${QtGui_GEN_DIR}/qtextblockgroup_wrapper.cpp @@ -172,7 +181,6 @@ ${QtGui_GEN_DIR}/qtextdocumentfragment_wrapper.cpp ${QtGui_GEN_DIR}/qtextdocumentwriter_wrapper.cpp ${QtGui_GEN_DIR}/qtextformat_wrapper.cpp ${QtGui_GEN_DIR}/qtextfragment_wrapper.cpp -${QtGui_GEN_DIR}/qtextframe_iterator_wrapper.cpp ${QtGui_GEN_DIR}/qtextframe_wrapper.cpp ${QtGui_GEN_DIR}/qtextframeformat_wrapper.cpp ${QtGui_GEN_DIR}/qtextimageformat_wrapper.cpp -- cgit v1.2.3