diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2023-01-27 12:47:57 +0100 |
---|---|---|
committer | Axel Spoerl <axel.spoerl@qt.io> | 2023-02-01 22:56:17 +0100 |
commit | e73389874d6f8dbfc4743c51eb3d3889dd2da7fb (patch) | |
tree | 62c20f6207897beda1535f76dc9d3159d3989d60 | |
parent | 814d66d55860a1eb204b804871d579da95eabd8f (diff) |
QtWidgets: Fix CMake Unity (Jumbo) builds
Remove clashing enumeration value ColumnCount and exclude
file in snippets.
Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: Ibd8a72d9d87e3dcbbb221c364d6b4c4f59b315df
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
-rw-r--r-- | src/widgets/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/widgets/doc/snippets/customviewstyle/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qformlayout.cpp | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index d0c0790921..a3e5a6c713 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -70,6 +70,11 @@ qt_internal_add_module(Widgets GENERATE_CPP_EXPORTS ) +if(APPLE) + set_source_files_properties(kernel/qapplication.cpp + PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) +endif() + # Resources: set(qstyle_resource_files "styles/images/cdr-128.png" diff --git a/src/widgets/doc/snippets/customviewstyle/CMakeLists.txt b/src/widgets/doc/snippets/customviewstyle/CMakeLists.txt index d424b583a4..04f89b83b6 100644 --- a/src/widgets/doc/snippets/customviewstyle/CMakeLists.txt +++ b/src/widgets/doc/snippets/customviewstyle/CMakeLists.txt @@ -12,3 +12,5 @@ target_link_libraries(widgets_customviewstyle_snippets PRIVATE Qt::Gui Qt::Widgets ) + +set_target_properties(widgets_customviewstyle_snippets PROPERTIES UNITY_BUILD OFF) diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp index 7e58273a90..01097b6123 100644 --- a/src/widgets/kernel/qformlayout.cpp +++ b/src/widgets/kernel/qformlayout.cpp @@ -68,8 +68,6 @@ void FixedColumnMatrix<T, NumColumns>::storageIndexToPosition(int idx, int *rowP const uint DefaultFieldGrowthPolicy = 255; const uint DefaultRowWrapPolicy = 255; -enum { ColumnCount = 2 }; - // -- our data structure for our items // This owns the QLayoutItem struct QFormLayoutItem @@ -152,7 +150,7 @@ class QFormLayoutPrivate : public QLayoutPrivate Q_DECLARE_PUBLIC(QFormLayout) public: - typedef QtPrivate::FixedColumnMatrix<QFormLayoutItem *, ColumnCount> ItemMatrix; + using ItemMatrix = QtPrivate::FixedColumnMatrix<QFormLayoutItem *, 2>; QFormLayoutPrivate(); ~QFormLayoutPrivate() { } |