mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[sipify] handle scope based enums
This commit is contained in:
parent
05756e5386
commit
e162040f04
@ -950,8 +950,9 @@ while ($LINE_IDX < $LINE_COUNT){
|
||||
}
|
||||
|
||||
# Enum declaration
|
||||
if ( $LINE =~ m/^\s*enum\s+\w+.*?$/ ){
|
||||
write_output("ENU1", "$LINE\n");
|
||||
# For scoped and type based enum, the type has to be removed
|
||||
if ( $LINE =~ m/^(\s*enum\s+(class\s+)?\w+)(\s*:\s*\w+)?.*$/ ){
|
||||
write_output("ENU1", "$1\n");
|
||||
if ($LINE =~ m/\{((\s*\w+)(\s*=\s*[\w\s\d<|]+.*?)?(,?))+\s*\}/){
|
||||
# one line declaration
|
||||
$LINE !~ m/=/ or exit_with_error("spify.pl does not handle enum one liners with value assignment. Use multiple lines instead.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user