[sipify] fix do not export template classes

This commit is contained in:
Denis Rouzaud 2022-03-10 16:03:02 +01:00
parent f3c9b7245e
commit 1879f51781
2 changed files with 2 additions and 3 deletions

View File

@ -7,5 +7,4 @@ class_headerfile:
no_export_macro:
- QgsRange
- QgsTemporalRange

View File

@ -906,7 +906,7 @@ while ($LINE_IDX < $LINE_COUNT){
push @DECLARED_CLASSES, $CLASSNAME[$#CLASSNAME];
}
dbg_info("class: ".$CLASSNAME[$#CLASSNAME]);
if ($LINE =~ m/\b[A-Z0-9_]+_EXPORT\b/ || $#CLASSNAME != 0 || $INPUT_LINES[$LINE_IDX-2] =~ m/^\s*template</){
if ($LINE =~ m/\b[A-Z0-9_]+_EXPORT\b/ || $#CLASSNAME != 0 || $INPUT_LINES[$LINE_IDX-2] =~ m/^\s*template\s*</){
# class should be exported except those not at top level or template classes
# if class is not exported, then its methods should be (checked whenever leaving out the class)
$EXPORTED[-1]++;