QtWidgets: Fix CMake Unity (Jumbo) builds

Remove clashing enumeration value ColumnCount and exclude
file in snippets.

Task-number: QTBUG-109394
Change-Id: Ibd8a72d9d87e3dcbbb221c364d6b4c4f59b315df
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit e73389874d6f8dbfc4743c51eb3d3889dd2da7fb)
This commit is contained in:
Friedemann Kleint 2023-01-27 12:47:57 +01:00
parent b3d5a49062
commit 5e42375127
3 changed files with 8 additions and 3 deletions

View File

@ -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"

View File

@ -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)

View File

@ -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() { }