From eb81a07732b14f15b2980a0c7d96d77ff7d94c4c Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 7 Feb 2024 14:33:45 +1000 Subject: [PATCH] Correctly tag Qgis.WkbType as IntEnum --- python/PyQt6/core/auto_generated/qgis.sip.in | 2 +- scripts/sipify.pl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/PyQt6/core/auto_generated/qgis.sip.in b/python/PyQt6/core/auto_generated/qgis.sip.in index 4e934cb4788..209ba3974a3 100644 --- a/python/PyQt6/core/auto_generated/qgis.sip.in +++ b/python/PyQt6/core/auto_generated/qgis.sip.in @@ -109,7 +109,7 @@ The development version typedef QFlags LayerFilters; - enum class WkbType + enum class WkbType /BaseType=IntEnum/ { Unknown, Point, diff --git a/scripts/sipify.pl b/scripts/sipify.pl index f35b4c852c4..7f2b121d4e8 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -1605,7 +1605,7 @@ while ($LINE_IDX < $LINE_COUNT){ if (defined $py_enum_type and $py_enum_type eq "IntFlag") { push @ENUM_INTFLAG_TYPES, $enum_cpp_name; } - if ( defined $enum_type and $enum_type eq "int" ) { + if (defined $enum_type and ($enum_type eq "int" or $enum_type eq "quint32")) { push @ENUM_INT_TYPES, "$ACTUAL_CLASS.$enum_qualname"; if ( $is_qt6 eq 1 ) { if (defined $py_enum_type) { @@ -1614,9 +1614,9 @@ while ($LINE_IDX < $LINE_COUNT){ $enum_decl .= " /BaseType=IntEnum/" } } - } - elsif (defined $isclass) - { + } elsif (defined $enum_type) { + exit_with_error("Unhandled enum type $enum_type for $enum_cpp_name"); + } elsif (defined $isclass) { push @ENUM_CLASS_NON_INT_TYPES, "$ACTUAL_CLASS.$enum_qualname"; }